On Oct 1, 2014, at 12:34 AM, Misa Simic wrote:
Have you considered maybe partial indexes?
http://www.postgresql.org/docs/9.3/static/indexes-partial.html
I.e idx1 on pk column of the table with where inside index exactly the same
as your first where
Idx2 on pk column with where inside
I'm trying to improve the speed of suite of queries that go across a few
million rows.
They use 2 main filters across a variety of columns:
WHERE (col_1 IS NULL ) AND (col_2 IS NULL) AND ((col_3 IS NULL) OR
(col_3 = col_1))
WHERE (col_1 IS True ) AND (col_2 IS True) AND (col_3
On 9/30/2014 4:50 PM, Jonathan Vanasco wrote:
WHERE (col_1 IS NULL ) AND (col_2 IS NULL) AND ((col_3 IS NULL) OR
(col_3 = col_1))
if col_1 IS NULL, then that OR condition doesn't make much sense.
just saying...
these 4 columns are all nullable booleans, so they can be TRUE,
On Sep 30, 2014, at 8:04 PM, John R Pierce pie...@hogranch.com wrote:
if col_1 IS NULL, then that OR condition doesn't make much sense. just
saying...
I was just making a quick example. There are two commonly used filter sets,
each are mostly on Bool columns that allow null -- but one
On Wednesday, October 1, 2014, Jonathan Vanasco postg...@2xlp.com wrote:
I'm trying to improve the speed of suite of queries that go across a few
million rows.
They use 2 main filters across a variety of columns:
WHERE (col_1 IS NULL ) AND (col_2 IS NULL) AND ((col_3 IS NULL) OR