Re: [AMaViS-user] SQL quarantine, quarantine table not optimized

2005-08-01 Thread Mark Martinec
Paolo, > As expected, there was no significant speedup/slowdown. Ok, thanks for your investigation. > You might want to add a note for MySQL users to read Chapter 15 of the > reference manual On chapter 15.17 I found: >... > So, do not waste time and resources by creating a specific index on

Re: [AMaViS-user] SQL quarantine, quarantine table not optimized

2005-08-01 Thread Paolo Cravero as2594
Mark Martinec wrote: it would be more informative to ask for: SELECT count(*) FROM quarantine WHERE chunk_ind = 1; to get the number of quarantined messages, regardless of their size, which may span multiple 16 kB chunks. Got it. Now I understand the meaning of chunk_ind. :) Since the

Re: [AMaViS-user] SQL quarantine, quarantine table not optimized

2005-08-01 Thread Sam Tran
On 8/1/05, Paolo Cravero as2594 <[EMAIL PROTECTED]> wrote: > Mark Martinec wrote: > > Dobar Dan Mark > > > I think that instead of asking for: > > SELECT count(*) FROM quarantine; > > (which gives the number of records in the database) > > > > it would be more informative to ask for: > > SE

Re: [AMaViS-user] SQL quarantine, quarantine table not optimized

2005-08-01 Thread Paolo Cravero as2594
Mark Martinec wrote: Dobar Dan Mark I think that instead of asking for: SELECT count(*) FROM quarantine; (which gives the number of records in the database) it would be more informative to ask for: SELECT count(*) FROM quarantine WHERE chunk_ind = 1; to get the number of quarantined m

Re: [AMaViS-user] SQL quarantine, quarantine table not optimized

2005-07-29 Thread Brian Wong
> I tried indexing the quarantine table by one of its fields "mail_id": > > CREATE INDEX quarantine_idx_mail_id ON quarantine(mail_id); > > and the query now takes a reasonable <1 second for 85000 rows. > I thought the 'PRIMARY KEY' in the 'CREATE TABLE quarantine' statement created an implicit

Re: [AMaViS-user] SQL quarantine, quarantine table not optimized

2005-07-29 Thread Mark Martinec
Paolo, > I am evaluating and stressing a "amavisd + SA + clamav + MySQL" setup > (one P4 3GHz machine, 1GB RAM). Full quarantine to MySQL (message bodies > too). > Latest test includes an attempt at filling up MySQL tables with LOTS of > data (million rows, 20-30GB table). > > I am not a MySQL gur

Re: [AMaViS-user] SQL quarantine, quarantine table not optimized

2005-07-29 Thread Sam Tran
Hi Paolo, On 7/29/05, Paolo Cravero as2594 <[EMAIL PROTECTED]> wrote: > Paolo Cravero as2594 wrote: > > I reply to myself before someone follows my tip... > > > I tried indexing the quarantine table by one of its fields "mail_id": > > CREATE INDEX quarantine_idx_mail_id ON quarantine(mail_id); >

Re: [AMaViS-user] SQL quarantine, quarantine table not optimized

2005-07-29 Thread Paolo Cravero as2594
Paolo Cravero as2594 wrote: I reply to myself before someone follows my tip... I tried indexing the quarantine table by one of its fields "mail_id": CREATE INDEX quarantine_idx_mail_id ON quarantine(mail_id); and the query now takes a reasonable <1 second for 85000 rows. I started reading MyS

[AMaViS-user] SQL quarantine, quarantine table not optimized

2005-07-29 Thread Paolo Cravero as2594
Hi. I am evaluating and stressing a "amavisd + SA + clamav + MySQL" setup (one P4 3GHz machine, 1GB RAM). Full quarantine to MySQL (message bodies too). Latest test includes an attempt at filling up MySQL tables with LOTS of data (million rows, 20-30GB table). I am not a MySQL guru, but I r