Subject: Developers of Sympa
List archive
- From: Guillaume Rousse <address@concealed>
- To: address@concealed
- Subject: Re: [sympa-developpers] RDBMS
- Date: Wed, 09 Jan 2013 18:24:18 +0100
Le 09/01/2013 17:26, David Verdin a écrit :
Hi all,'greatly' vastly depends on your usage. Only repeated queries (such as: who is member of list X) would offer actual performance improvement. And we'd need benchmark anyway to measure them.
Le 08/01/13 05:33, IKEDA Soji a écrit :
Dear allThanks Soji, a happy new year to you too!
A happy new year!
On Thu, 27 Dec 2012 19:30:44 +0100Yes, we could support multiple granularities: full table for creation
Guillaume Rousse<address@concealed> wrote:
Le 18/12/2012 16:46, IKEDA Soji a écrit :You are right. On current 6.2 branch the SDM component for SQLite
Hi developers,I just commited a bunch of tests for those different RDBMS in my branch.
By now, I am debugging Sympa with MySQL (mainly 5.5 and sometimes
earlier), Pg (only 9.1) and SQLite (3.7.7; current code won't
support SQLite 2.x). They are working nice or so.
Oracle, Sybase (and MS-SQL/ODBC and Informix and..., and..., more!)
has not been checked by me.
What kind of RDBMS(es) you are using for debugging and coding?
Only mysql and sqlite do actual database interaction tests, whereas
other just test the statement generation methods.I should add
interactions test with postgresql quite easily soon, and eventually port
the whole stuff to Test::Database rather than rely on environment
vaariables.
Anyway, those tests quickly show than trying to produce specific SQL
statement isn't enough to ensure complete transparency, as underlying
features seems to differ quite a lot between various RDBMS. For
instance, sqlite has very limited support for table modifications,
meaning deleting fields or adding primary keys after table creation
won't work...
exactly do it.
So, rather than the current API granularity, allowing to create an emptyCurrent step-by-step construction is ugry. But anyway, addition and
table and populating it in a second time, it would seems safer and more
portable to be able to passe a fields list definition to add_table()
method. Additionaly, it would avoid the ugly 'temporary' field hack :)
deletion of fields/keys are nessessary for upgrade process.
and atomic modification for upgrades.
It looks promising indeed. Does anybody know whether this module uses
And before Marc jumps on the subject, it may be interesting to look forThey seem the wheels and the axles we have desired.
already existing perl ORMs, rather than reinventing the wheel. Whereas
Class::DBI or Class::DBIx are definitively overkill, lightweight
alternatives as DBI::Skinny would seem a good compromise between
additional dependencies and maintainance gain.
precompiled statements for select and update queries? I'd really like to
generalize this practice as it is supposed to greatly improve database
usage performances.
I don't think we first need to switch to an ORM to achieve this, tough, and the current framework would easily be converted to achieve this. That's just a matter of using placeholders instead of sprintf format in SQL queries, and caching the result of prepare() with the raw query.
For instance:
Sympa::SDM::do_query->('SELECT count(*) FROM user_table WHERE email_user = ?', $who);
sub do_query {
my ($query, @params) = @_;
my $sth = $cache->{$query} ||= $dbh->prepare($query);
return $sth->execute(@params);
}
The additional side-effect is to let DBI handle quoting directly...
--
Guillaume Rousse
INRIA, Direction des systèmes d'information
Domaine de Voluceau
Rocquencourt - BP 105
78153 Le Chesnay
Tel: 01 39 63 58 31
Attachment:
smime.p7s
Description: Signature cryptographique S/MIME
-
Re: [sympa-developpers] RDBMS,
IKEDA Soji, 01/08/2013
-
Re: [sympa-developpers] RDBMS,
David Verdin, 01/09/2013
-
Re: [sympa-developpers] RDBMS,
Guillaume Rousse, 01/09/2013
- Re: [sympa-developpers] RDBMS, David Verdin, 01/10/2013
-
Re: [sympa-developpers] RDBMS,
Guillaume Rousse, 01/09/2013
-
Re: [sympa-developpers] RDBMS,
David Verdin, 01/09/2013
Archive powered by MHonArc 2.6.19+.