From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: frbn@efbs-seafrigo.fr
Cc: pgsql-sql@postgresql.org
Subject: Re: SELECT * FROM t where p or q;
Date: Tue, 20 Nov 2001 00:10:16 -0800 (PST)
Message-ID: <20011120000953.M53451-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <3BF51764.8BEAC873@efbs-seafrigo.fr>
On Fri, 16 Nov 2001 frbn@efbs-seafrigo.fr wrote:
> hi,
> on a +10 millions rec table, a simple select:
>
> SELECT * FROM tab where num = x;
>
> time: 5 secondes
>
> SELECT * FROM tab where num = y;
>
> time: 5 secondes
>
>
> SELECT * FROM tab WHERE num = x OR num = y;
>
> time: more than 10 mn !!!
>
> num is an integer.
Have you run vacuum analyze, what does explain show
on the three queries?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: sszabo@megazone23.bigpanda.com, frbn@efbs-seafrigo.fr
Subject: Re: SELECT * FROM t where p or q;
In-Reply-To: <20011120000953.M53451-100000@megazone23.bigpanda.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox