| From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
|---|---|
| To: | Moshe Jacobson <moshe(at)neadwerx(dot)com> |
| Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: 9.1: Slow to add range check on indexed column |
| Date: | 2013-05-25 20:18:31 |
| Message-ID: | 51A11C97.90209@iol.ie |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 25/05/2013 20:37, Moshe Jacobson wrote:
> I just created a new partition in a log table, and then built a check
> constraint on the recorded timestamp column.
>
> I have an index on this column, but the adding of the check constraint
> took a very, very long time.
>
> It seems that PostgreSQL 9.1 does not check the index when building a
> check constraint on an indexed column. Is this correct? Is this
> addressed in future releases?
At a guess, I'd imagine that the check constraint has to be checked
against every row in the table, so the index would not be used anyway.
Ray.
--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Langote | 2013-05-26 11:39:55 | Re: pg_receivexlog 9.2 client working with 9.1 server? |
| Previous Message | Moshe Jacobson | 2013-05-25 19:37:04 | 9.1: Slow to add range check on indexed column |