I could not duplicate this on any identical database, but thought I
would report it here, just for completeness. I've tried reindexing,
vacuuming, etc. Explain plans all look normal.

Version is 8.1.3
\d bigtable
...
"bigtable_status_partial" btree (status) WHERE status::text <>
'shipped'::text
 
 
greg=> select (select count(*) from bigtable where status  = 'shipped')
            + (select count(*) from bigtable where status <> 'shipped')
       UNION select count(*) from bigtable;
 ?column?
----------
  1185213
  1600569
 
greg=> drop index bigtable_status_partial;
 
greg=> select (select count(*) from bigtable where status  = 'shipped')
            + (select count(*) from bigtable where status <> 'shipped')
       UNION select count(*) from bigtable;
 ?column?
----------
  1185213
(1 row)

--
Greg Sabino Mullane [EMAIL PROTECTED]
End Point Corporation
PGP Key: 0x14964AC8 200608290003
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8


Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to