Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-performance by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group