Re: index speed-up and automatic tables/procedures creation

From: "Jean-Yves F(dot) Barbier" <12ukwn(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: index speed-up and automatic tables/procedures creation
Date: 2009-11-27 15:04:44
Message-ID: 4B0FEA8C.3040803@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Tom Lane a écrit :
...

> I think you're wasting your time. What you are setting out to do here
> is manually emulate the top layer or so of a large index. Unless you
> have very specific (and unusual) data access patterns that you know in
> considerable detail, this is not a game you are going to win. Just go
> with the one big table and one index, you'll be happier. (Note that
> "several million rows" is not big, it's barely enough to notice.)
>
> You will see a lot of discussion about partitioning of tables if you
> look around the list archives, but this is not done with the idea that
> it makes access to any one row faster. The biggest motivation usually
> is to allow dropping ranges of data cheaply, like throwing away a month's
> or year's worth of old data at once.

Just to make sure I understood the spirit:

* I keep a large table,

* As my join tables have just (pkey=pkeys from each side), I also make indexes
on each foreign pkey,

* (May be?) I also make partial indexes, in order to have ie a faster retrieve
of not-sold items instead of excluding sold items in the query

JY
--
-- I have seen the FUN --

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Thom Brown 2009-11-27 15:16:23 Re: How best to index foreign key for inner join
Previous Message Nathaniel Trellice 2009-11-27 14:44:53 Re: How best to index foreign key for inner join