Re: hint unique result fro union - Mailing list pgsql-general

From Jaime Casanova
Subject Re: hint unique result fro union
Date
Msg-id c2d9e70e0608161131n5e78d04aw1af103869ebc8902@mail.gmail.com
Whole thread Raw
In response to hint unique result fro union  ("Matteo Bertini" <matteob@naufraghi.net>)
List pgsql-general
> Mainly, thinking about partitions, I'd like to create a small, frequently
> accessed partition and a big, rarely accessed partition.
>
> I'd like to hint pg to stop the query on the parent partition at the first
> found item (and so hint not to analyze all the childs), because I know the
> index I'm using is unique.
>

what you want is know as "Constraint Exclusion"
http://www.postgresql.org/docs/8.1/static/ddl-partitioning.html#DDL-PARTITIONING-CONSTRAINT-EXCLUSION

--
regards,
Jaime Casanova

"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs and the universe trying
to produce bigger and better idiots.
So far, the universe is winning."
                                       Richard Cook

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: Move db files from one pgsql instance to another
Next
From: "Javier de la Torre"
Date:
Subject: Re: Move db files from one pgsql instance to another