Re: seqscan instead of index scan

From: Pierre-Frédéric Caillaud <lists(at)boutiquenumerique(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: seqscan instead of index scan
Date: 2004-08-30 19:39:17
Message-ID: opsdj8vrsacq72hf@musicbox
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


>> create index t_idx on t((c+d));
>> select * from t where c+d > 0;

Why not :

select ((select * from t where c<>0::bigint) UNION (select * from t where
d<>0::bigint))
group by whatever;

or someting ?

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bruno Wolff III 2004-08-30 19:40:50 Re: Why does a simple query not use an obvious index?
Previous Message Pierre-Frédéric Caillaud 2004-08-30 19:32:28 Re: Why does a simple query not use an obvious index?