From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | sfpug(at)postgresql(dot)org |
Subject: | Patrick's Evil Query |
Date: | 2003-01-14 21:09:18 |
Message-ID: | 200301141309.18388.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | sfpug |
Folks,
For those of you who were present at last night's meeting, we decided to
tackle an "evil" query presented us by Patrick, which was taking 3.5 minutes
to execute.
For David & Matt, who had to leave before we solved it, Stephan and I found
the problem. At the output stage of the query, Patrick was executing a
60-line CASE statement with type conversions which accounted for a full
minute-and-a-half of the excution time for the query. Replaceing the CASE
statement with a function should improve the situation.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | elein | 2003-01-14 23:54:30 | Re: Bring Query Problems to Meeting! |
Previous Message | Josh Berkus | 2003-01-14 17:16:24 | Bring Query Problems to Meeting! |