| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Heikki Linnakangas <heikki(at)enterprisedb(dot)com> |
| Cc: | Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: comparing index columns |
| Date: | 2007-06-13 13:36:46 |
| Message-ID: | 9123.1181741806@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
> How about just doing a memcmp? That would be safe, simple and fast and
> covers all interesting use cases.
You'd have to use datumIsEqual() or equivalent, and figure out what to
do about nulls. I think it'd work though, at least for the purposes
that HOT needs. There are failure cases; for example a previously
not-toasted index key column could get toasted due to expansion of an
unrelated data column. But +1 for speed over accuracy here, as long as
it can never make a false equality report.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2007-06-13 13:48:12 | Re: DROP TABLE and autovacuum |
| Previous Message | Heikki Linnakangas | 2007-06-13 13:35:37 | Re: EXPLAIN omits schema? |