From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ben <bench(at)silentmedia(dot)com> |
Cc: | Martijn van Oosterhout <kleptog(at)svana(dot)org>, PostgreSQL general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: a question for the way-back machine |
Date: | 2006-12-13 22:28:44 |
Message-ID: | 12474.1166048924@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ben <bench(at)silentmedia(dot)com> writes:
> Wouldn't it need to check the unique constraint (an index on the table)
> before the insert can succeed? It seems like it would be better to check
> the index than to do a full table scan to try to satisfy that constraint.
Postgres contains no code that would even consider doing a seqscan for a
uniqueness check; it could not work because of race-condition considerations,
never mind performance.
You have not given us any clue about where the seqscans are really
coming from ... have you got any user-defined triggers, SQL functions in
CHECK constraints, stuff like that?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Brandon Aiken | 2006-12-13 22:50:05 | Re: INSERT INTO row value constructors |
Previous Message | andy rost | 2006-12-13 22:25:59 | pg_controldata output documentation |