pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: alvis@piladzi-2.biz
To: pgsql-performance@postgresql.org
Subject: When NOT to index small tables?
Date: Wed, 20 Aug 2003 13:01:16 +0300
Message-ID: <004201c36701$fffee930$1401010a@Xeon> (raw)

I have found many reasons not to index small tables (see .
But I still have questions.

1. How small is small enough?
2. am I supposed to drop primary key index on so called 'label tables'
knowing I am using this pk in join clause?
3. Is it good to drop index on small table If I know I have created VIEW and
joined large table and the small one
and I have where condition on that particular colum?
Ilustrative example:
table small
{
id -- primary key
colum_for_where_condition -- index or not to index?
}
table large
{
...
fk_for_small_table -- indexed
...
}
create view as select .....
inner join on common_column ..
I have migrated from mysql .
I have found that complex view expression takes about 10 sec using ordinary
planner,
but genetic alg takes about 5 sec. Strange?
I can give details if someone is interested.

Regards,
Alvis





view thread (2+ messages)  latest in thread

Message-ID: <004201c36701$fffee930$1401010a@Xeon>
Permalink:  ../004201c36701$fffee930$1401010a@Xeon/
Also on:    postgresql.org/message-id/004201c36701$fffee930$1401010a@Xeon

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: alvis@piladzi-2.biz
  Subject: Re: When NOT to index small tables?
  In-Reply-To: <004201c36701$fffee930$1401010a@Xeon>
  References: <004201c36701$fffee930$1401010a@Xeon>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox