[Mod_log_sql] index on created table

Derk Gortemaker mailings at obriendesign.nl
Sun Apr 10 10:44:14 EST 2005

> hmm. Honestly I don't know. The previous 3 authors of mod_log_sql never
> added an primary key, but I do see the need for one as w/o it you can
> not easily select unique records.  If you would like you can just add a
> primary key (probably of type big int unsigned auto_increment) and see
> if it slows anything down, there is no need to modify mod_log_sql at all
> if you make it an auto_increment field.
> Let me know if it affects performance badly.. if it doesn't than I'll
> make that change for the next release.

I can do that, but i do not have a very big testing environment. And I am not 
that "into" databases that i can tell if it helps. But the selecting of 
unique records was the trigger for me to ask this question.
If I have to make a guess i would say that is makes almost no difference. And 
I always like the idea of having an auto_increment (mysql) or a sequence 
(postgres) in almost each table... (and i'm told that every table should have 
a primary key.)

Maybe someone else can say something about this...

Could you add it to mod_log_sql, because it is no option to update auto 
created tables... 


More information about the Mod_log_sql mailing list