Re: [Dbmail-dev] Re: Postgres vs MySQL performance?

2004-08-06 Thread Matthew T. O'Connor
Jesse Norell wrote: Matthew T. O'Connor wrote: I assume the "fix" you are talking about is that starting with PostgreSQL 7.4 Vacuum reclaims index space. That resolves the major remaining file bloat problem with PostgreSQL. As of 7.4 as long as your FSM setting is high enough, and you v

[Dbmail-dev] current cvs version performance

2004-08-06 Thread Sergey Spiridonov
Hi, please, correct me if I am on the wrong list. I think, that everything related to current cvs version belongs to dbmail.devel? today I checked out current cvs version. It take some time for me to convert tables. It works now, but fetching every single mail is very slow. Here is a quota from

[Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Sergey Spiridonov
Sergey Spiridonov wrote: problem is in query: SELECT messageblk FROM dbmail_messageblks LEFT JOIN dbmail_messages USING (physmessage_id) WHERE dbmail_messages.message_idnr = '551047' ORDER BY messageblk_idnr which takes up to 6 seconds!!! Slightly rewritten query SELECT messageblk FROM dbmail

Re: [Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Aaron Stone
Sergey Spiridonov <[EMAIL PROTECTED]> said: > Sergey Spiridonov wrote: >> problem is in query: SELECT messageblk FROM dbmail_messageblks LEFT JOIN >> dbmail_messages USING (physmessage_id) WHERE >> dbmail_messages.message_idnr = '551047' ORDER BY messageblk_idnr >> >> which takes up to 6 seconds!

Re: [Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Paul J Stevens
Does this mean postgres has trouble with left joins. Afaik, both queries are equivalent. Mysql treats them exactly the same, according to the docs and analyze. Or could this be related to the index bloat Matthew and Jesse have been discussing? Sergey Spiridonov wrote: Sergey Spiridonov wrote

[Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Sergey Spiridonov
Aaron Stone wrote: I get the same results for both queries, however I also get the same EXPLAIN. I'm using MyISAM tables with the earlier 2.0 defs renamed to dbmail_ by hand. Which database scripts did you use? I can run them on a test database on my machine and see if there are any differences

Re: [Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Ilja Booij
Sergey Spiridonov wrote: Seems to be postgresql problem. This query is used in 3 places: 2 times in dbmsgbuf.c and 1 time in dbsearch.c. I changed them and till now everything works fine... # postgres --version postgres (PostgreSQL) 7.3.6 This query is a good candidate for being replaced th

RE: [Dbmail-dev] Re: Postgres vs MySQL performance?

2004-08-06 Thread Donald C. Sumbry ][
> This is very interesting. Would you mind writing a README.postgresql > with this (and possibly more) information for tuning > PostgreSQL for DbMail? I wouldn't mind at all. However if there is someone that feels they may be more qualified, then by all means step in. I'm still pretty new to dbm

Re: [Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Thomas Mueller
Sergey Spiridonov wrote: > I converted to dbmail_* by hand just yesterday also. I'm using > postgres, and for postgres explain differs: This is for Postgres 7.4.2: > dbmail=# explain SELECT messageblk FROM dbmail_messageblks LEFT JOIN > dbmail_messages USING (physmessage_id) WHERE > dbmail_mes

Re: [Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Paul J Stevens
Could someone first please confirm that left joins are really this broken in postgres. Perhaps it's something in Sergey's setup/build of postgres. Left joins are *so* much more readable than normal joins. Ilja Booij wrote: Sergey Spiridonov wrote: Seems to be postgresql problem. This query

[Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Sergey Spiridonov
Thomas Mueller wrote: Sergey Spiridonov wrote: I converted to dbmail_* by hand just yesterday also. I'm using postgres, and for postgres explain differs: This is for Postgres 7.4.2: O.K. it is time to upgrade for me. Thank you. -- Best regards, Sergey Spiridonov

RE: [Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Donald C. Sumbry ][
[EMAIL PROTECTED] wrote: > Could someone first please confirm that left joins are really > this broken in > postgres. Perhaps it's something in Sergey's setup/build of postgres. Funny, I get the same result for both queries. Postgres 7.4.3 on FreeBSD...

[Dbmail-dev] can't compile current cvs

2004-08-06 Thread Igor Olemskoi
creating dbmail-pop3d gcc -DHAVE_CONFIG_H -I. -I. -I.-fomit-frame-pointer -g -O2 -W -Wall -Wpointer-arith -Wstrict-prototypes -c quota.c gcc -DHAVE_CONFIG_H -I. -I. -I.-fomit-frame-pointer -g -O2 -W -Wall -Wpointer-arith -Wstrict-prototypes -c imap4.c gcc -DHAVE_CONFIG_H -I. -I. -I.-f

Re: [Dbmail-dev] can't compile current cvs

2004-08-06 Thread Ilja Booij
Oops. My wrong. I could've sworn I did a compile before committing.. but it seems I didn't.. it's fixed now. Ilja Igor Olemskoi wrote: creating dbmail-pop3d gcc -DHAVE_CONFIG_H -I. -I. -I.-fomit-frame-pointer -g -O2 -W -Wall -Wpointer-arith -Wstrict-prototypes -c quota.c gcc -DHAVE_CONF

[Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Sergey Spiridonov
Donald C. Sumbry ][ wrote: [EMAIL PROTECTED] wrote: Could someone first please confirm that left joins are really this broken in postgres. Perhaps it's something in Sergey's setup/build of postgres. Funny, I get the same result for both queries. Postgres 7.4.3 on FreeBSD...

[Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Sergey Spiridonov
Sergey Spiridonov <[EMAIL PROTECTED]> writes: > Yes, but for me it makes no sense. I would understand, if it will be > > SELECT messageblk FROM dbmail_messages LEFT JOIN dbmail_messageblks >USING (physmessage_id) >WHERE dbmail_messages.message_idnr = '%llu' > > s

Re: [Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Paul J Stevens
Sergey Spiridonov wrote: Sergey Spiridonov <[EMAIL PROTECTED]> writes: Yes, but for me it makes no sense. I would understand, if it will be SELECT messageblk FROM dbmail_messages LEFT JOIN dbmail_messageblks USING (physmessage_id) WHERE dbmail_messages.message_i

Re: [Dbmail-dev] Re: Postgres vs MySQL performance?

2004-08-06 Thread Jesse Norell
> > We do regularly drop an rebuild indexes on messages, but it looks like > >we do not on messageblks. There is one index on messageblks(message_idnr) > >and the primary key, both of which are bigint's (8 bytes). So with > >max(messageblk_idnr) at < 45million, that should account for about 72

[Dbmail-dev] Re: current cvs version performance

2004-08-06 Thread Michael Häusler
Hello, mysql> SELECT * FROM table1,table2 WHERE table1.id=table2.id; mysql> SELECT * FROM table1 LEFT JOIN table2 ON table1.id=table2.id; mysql> SELECT * FROM table1 LEFT JOIN table2 USING (id); These are all semantically identical in mysql. No, these are not all semantically e