Re: index creation order?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Allen Landsidel <all(at)biosys(dot)net>, pgsql-performance(at)postgresql(dot)org
Subject: Re: index creation order?
Date: 2003-10-31 18:58:19
Message-ID: 200310311058.19455.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Allen,

> I had no idea analyze was playing such a big role in this sense.. I really
> thought that other than saving space, it wasn't doing much for tables that
> don't have indexes on the.

Among other things, ANALYZE tells postgres how many rows are in the table. So
if you add a PK constraint after loading 10 million rows without ANALYZE,
PostgreSQL is likely to think that there is only one row in the table ... and
choose a nested loop or some other really inefficient method of checking for
uniqueness.

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Allen Landsidel 2003-10-31 19:01:28 Re: index creation order?
Previous Message scott.marlowe 2003-10-31 18:52:35 Re: Pg+Linux swap use