Re: [PERFORM] Avoiding tuple construction/deconstruction during joining

2005-03-15 Thread PFC
On my machine (Laptop with Pentium-M 1.6 GHz and 512MB DDR333) I get the following timings : Big Joins Query will all the fields and no order by (I just put a SELECT * in the first table) yielding about 6k rows : => 12136.338 ms Replacing the SELECT * from the table with many fields by ju

Re: [PERFORM] Avoiding tuple construction/deconstruction during joining

2005-03-15 Thread PFC
I have asked him for the data and played with his queries, and obtained massive speedups with the following queries : http://boutiquenumerique.com/pf/miroslav/query.sql http://boutiquenumerique.com/pf/miroslav/query2.sql http://boutiquenumerique.com/pf/miroslav/materialize.sql Note that my opt

Re: [PERFORM] Avoiding tuple construction/deconstruction during joining

2005-03-14 Thread Miroslav Šulc
Tom Lane wrote: =?windows-1250?Q?Miroslav_=8Aulc?= <[EMAIL PROTECTED]> writes: seriously, I am far below this level of knowledge. But I can contribute a test that (maybe) can help. I have rewritten the query so it JOINs the varchar() fields (in fact all fields except the IDPK) at the last INNE

Re: [PERFORM] Avoiding tuple construction/deconstruction during joining

2005-03-14 Thread Miroslav Šulc
Tom Lane wrote: So I have some results. I have tested the query on both PostgreSQL 8.0.1 and MySQL 4.1.8 with LIMIT set to 30 and OFFSET set to 6000. PostgreSQL result is 11,667.916 ms, MySQL result is 448.4 ms. That's a fairly impressive discrepancy :-(, and even the slot_getattr() patch th

Re: [PERFORM] Avoiding tuple construction/deconstruction during joining

2005-03-14 Thread Tom Lane
=?windows-1250?Q?Miroslav_=8Aulc?= <[EMAIL PROTECTED]> writes: > seriously, I am far below this level of knowledge. But I can contribute > a test that (maybe) can help. I have rewritten the query so it JOINs the > varchar() fields (in fact all fields except the IDPK) at the last INNER > JOIN. Th

[PERFORM] Avoiding tuple construction/deconstruction during joining

2005-03-14 Thread Tom Lane
=?ISO-8859-2?Q?Miroslav_=A9ulc?= <[EMAIL PROTECTED]> writes: > [ concerning a deeply nested LEFT JOIN to get data from a star schema ] > So I have some results. I have tested the query on both PostgreSQL 8.0.1 > and MySQL 4.1.8 with LIMIT set to 30 and OFFSET set to 6000. PostgreSQL > result is