Re: Planning a change of representation in the planner

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hannu Krosing <hannu(at)tm(dot)ee>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Planning a change of representation in the planner
Date: 2003-02-07 14:41:15
Message-ID: 26603.1044628875@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hannu Krosing <hannu(at)tm(dot)ee> writes:
> Maybe the quicker way to avoid duplicate-element bugs (and get faster
> merges) is to keep the lists ordered, so instead of just appending the
> next int, you scan to the proper place and put it there (if it is not
> there already).

I had thought of doing that before it occurred to me to switch to a
bitmap representation, but I was always afraid to --- I think it would
be more buggy not less so. The compiler won't give any help in catching
places where plain-list operations are applied to what should be an
ordered list. If I change the struct type completely, then the compiler
will help me.

Also, the bitmap representation makes for a nice reduction in palloc()
traffic (typically one palloc per set, not one per set element). That
part of the performance gain won't be there if we just change to ordered
lists.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2003-02-07 15:01:14 Re: [HACKERS] Alpha version of contrib/tsearch is available for testing
Previous Message Martin Marques 2003-02-07 13:47:38 Incremental backup