[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

[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

[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

[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

[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

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

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: 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

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...

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