Re: Creating tons of tables to support a query

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jan Ploski <jpljpl(at)gmx(dot)de>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Creating tons of tables to support a query
Date: 2002-09-09 02:49:32
Message-ID: 20020908194748.E8314-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Sun, 8 Sep 2002, Jan Ploski wrote:

> I am in particular wondering, why an index on message(sectionID, dateSent)
> does not make these queries comparably fast:
>
> select msgnum from message where
> sectionID = ? and
> dateSent > ?
> order by dateSent
> limit 1;

I don't think that'll use an index on (sectionID, dateSent) for the sort
step. I think an index on (dateSent,sectionID) might be, however.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2002-09-09 03:00:36 Re: Australian Open Source Awards
Previous Message Christopher Kings-Lynne 2002-09-09 02:32:38 Australian Open Source Awards