Re: many tables in db

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kenneth Been <kennethb(at)telocity(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: many tables in db
Date: 2001-07-19 22:22:57
Message-ID: 305.995581377@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kenneth Been <kennethb(at)telocity(dot)com> writes:
> ... So a one table solution would have a query like

> select stuff from lines where range && query_range

> which would be replaced in the multi-table solution with

> (select stuff from lines_43 where range && query_range)
> union
> (select stuff from lines_46 where range && query_range)

> I can easily store in memory the range (bounding box) for
> each table, so no disk accesses are required to know which
> tables need to be searched.

Hmm. My immediate reaction: if the rtree index can't do that for you a
lot better than you can do it for yourself, then the rtree concept is
seriously flawed, or the implementation needs lots of work. What you're
essentially proposing is to do the top level of rtree indexing yourself.
That should definitely not be a win.

Getting around the not-enough-space-to-cluster problem might take some
creativity, however. I'd suggest that before you spend too much time on
it, you run some experiments on a table with only half the entries, and
see if it's really worth the trouble to try to accomplish the
clustering.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message ljb 2001-07-20 01:52:42 Re: Examples of using bytea type
Previous Message Lee Harr 2001-07-19 21:53:16 Re: Client connection problem...