Re: [GENERAL] Expensive query

From: Christophe Pettus <pettus(at)postdirect(dot)com>
To: Dustin Sallings <dustin(at)spy(dot)net>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Expensive query
Date: 1998-10-30 23:20:07
Message-ID: 4.1.19981030151737.00a1c920@exchange.postdirect.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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.

> I would also recommend not making code a char(10). If you put an
>index on code and an index on date, you should be able to get your results
>pretty quick.

They are indexed.

Using ints is not unreasonable, but does not explain the pathological behavior.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Meyer 1998-10-31 03:19:27 Re: [GENERAL] Problem with aggregates and group by
Previous Message Adam Miller 1998-10-30 22:24:58 thrashing like a beached shark