Skip site navigation (1) Skip section navigation (2)

Re: Index creation time and distribution

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Guillaume Smet" <guillaume(dot)smet(at)gmail(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Index creation time and distribution
Date: 2008-05-22 13:14:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
"Guillaume Smet" <guillaume(dot)smet(at)gmail(dot)com> writes:
> I experienced this morning a performance problem when we imported a
> dump in a 8.1 database.
> The table is 5 millions rows large and when the dump creates an index
> on a specific text column called clazz it takes 27 minutes while on
> the other columns, it only takes a couple of seconds:
> The only weird thing about this column is that 4.7 millions of rows
> have the exact same value.

Do you have maintenance_work_mem set large enough that the index
creation sort is done in-memory?  8.1 depends on the platform's qsort
and a lot of them are kinda pessimal for input like this.

8.2 (which uses our own qsort) seems to perform better in a quick

			regards, tom lane

In response to


pgsql-performance by date

Next:From: Guillaume SmetDate: 2008-05-22 13:38:25
Subject: Re: Index creation time and distribution
Previous:From: Guillaume SmetDate: 2008-05-22 12:32:27
Subject: Index creation time and distribution

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group