From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "David M(dot) Richter" <David(dot)M(dot)Richter(at)freenet(dot)de> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Query optimizing - paradox behave |
Date: | 2001-07-20 17:05:16 |
Message-ID: | 4085.995648716@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
"David M. Richter" <David(dot)M(dot)Richter(at)freenet(dot)de> writes:
> The query with the 3 tables is faster than the query with 2 tables.
How you figure that?
> time psql -d compare -c "SELECT patient.*,study.* FROM
> patient,study,relpatient_study000 r0 WHERE
> (patient.chiliOID=r0.parentOID AND study.chiliOID=r0.childOID) order by
> patient.name using <" > 3tableni
> 1.671u 0.130s 0:11.14 16.4% 0+0k 0+0io 208pf+0w
> time psql -d pacs -c "SELECT patient.*,study.* FROM patient,study WHERE
> (patient.chiliOID=study.patientOID ) order by patient.name using <" >
> 2tableni
> 1.730u 0.120s 0:09.44 19.5% 0+0k 0+0io 208pf+0w
9.44 vs 11.14 seconds looks like a clear advantage for the second query
to me...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Dado Feigenblatt | 2001-07-20 17:10:01 | Re: nextval on insert by arbitrary sequence |
Previous Message | Bruce Momjian | 2001-07-20 16:56:31 | Re: TODO List |