Re: [GENERAL] Expensive query

From: dustin sallings <dustin(at)spy(dot)net>
To: Christophe Pettus <pettus(at)postdirect(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Expensive query
Date: 1998-10-31 05:05:37
Message-ID: Pine.NEB.4.02.9810302101230.1221-100000@dhcp-199.west.spy.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 30 Oct 1998, Christophe Pettus wrote:

// At 02:13 PM 10/30/98 , you wrote:
// > That users table looks kinda useless. I'd recommend changing id
// >to name and making id an int, then putting your events users in as ints.
// >Currently, it doesn't do anything at all, and you might as well be doing
// >this query [...]
//
// Actually, the real-life 'users' table has lots of fields, none of
// them relevant to the question at hand.

Right, the point was the table you were using in the query the way
you were using it in the query wouldn't do anything but slow down the
query at best. You were doing three queries with no chance of the
optimizer doing its job. Also using ``is not in'' on those search results
just sounds like it'd be horribly slow when you could just ask the whole
thing in one query.

--
SA, beyond.com The world is watching America,
pub 1024/3CAE01D5 1994/11/03 Dustin Sallings <dustin(at)spy(dot)net>
| Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE
L________________________________________ and America is watching TV. __

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Troy Hanson 1998-10-31 19:11:51 SCO Unix 3.2 support?
Previous Message Mike Meyer 1998-10-31 03:19:27 Re: [GENERAL] Problem with aggregates and group by