Skip site navigation (1) Skip section navigation (2)

Re: Patrick's Evil Query

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Patrick Hatcher <PHatcher(at)macys(dot)com>
Cc: <sfpug(at)postgresql(dot)org>, <sfpug-owner(at)postgresql(dot)org>
Subject: Re: Patrick's Evil Query
Date: 2003-01-21 00:17:02
Message-ID: (view raw, whole thread or download thread mbox)
Lists: sfpug
On Mon, 20 Jan 2003, Patrick Hatcher wrote:

> I thought I would ask this question here before sending to the Performance
> list:
> So I run my Evil query using a condition of gmmid = 6.  It takes about 90
> secs to run.  However, if I run this and add a LIMIT 100 clause, the query
> runs in less than 5 secs.

Well, some not insignificant portion of that time is being spent making
the complicated select list at the top level.  That part would certainly
be sped up if there were less rows to do it for.

Also, does it give the same plan?  It is possible that it might choose a
different plan if it only wants 100 rows out.

In response to

sfpug by date

Next:From: Josh BerkusDate: 2003-01-21 16:16:08
Subject: Re: Reporting: Oracle-like features?
Previous:From: Patrick HatcherDate: 2003-01-20 23:55:19
Subject: Re: Patrick's Evil Query

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group