Re: hash partitioning - Mailing list pgsql-general

From Tom Lane
Subject Re: hash partitioning
Date
Msg-id 27677.1220462485@sss.pgh.pa.us
Whole thread Raw
In response to hash partitioning  ("David West" <david.west@cusppoint.com>)
List pgsql-general
"David West" <david.west@cusppoint.com> writes:
> I'm wondering why the postgres planner is not capable of determining the
> correct partition for a simple select for the following partitioning scheme,

The planner doesn't know anything about the behavior of %.
Heed the fine manual's advice:

    Keep the partitioning constraints simple, else the planner may not be
    able to prove that partitions don't need to be visited. Use simple
    equality conditions for list partitioning, or simple range tests for
    range partitioning, as illustrated in the preceding examples. A good
    rule of thumb is that partitioning constraints should contain only
    comparisons of the partitioning column(s) to constants using
    B-tree-indexable operators.


            regards, tom lane

pgsql-general by date:

Previous
From: William Garrison
Date:
Subject: Simple query not using index: why?
Next
From: William Garrison
Date:
Subject: Re: hash partitioning