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 ?
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly