Re: Planning a change of representation in the planner

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

Tom Lane kirjutas R, 07.02.2003 kell 06:35:
> I've been thinking of doing this for a while just on efficiency grounds,
> but kept putting it off because I don't expect much of any performance
> gain on simple queries. (You need a dozen or so tables in a query
> before the inefficiencies of the list representation really start to
> hurt.) But tonight I'm thinking I'll do it anyway, because it'll also
> be impervious to duplicate-element bugs.
>
> Comments?

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).

Ordered lists are also much faster ( just O(N) ) to
compare/union/intersect.

--
Hannu Krosing <hannu(at)tm(dot)ee>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Elias Athanasopoulos 2003-02-07 10:55:45 cvs (7/2/2003) is broken?
Previous Message Hannu Krosing 2003-02-07 07:59:42 Re: Status report: regex replacement