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

Re: Extremely slow intarray index creation and inserts.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, pgsql-performance(at)postgreSQL(dot)org
Subject: Re: Extremely slow intarray index creation and inserts.
Date: 2009-03-18 03:24:59
Message-ID: 1804.1237346699@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Ron Mayer <rm_pg(at)cheapcomplexdevices(dot)com> writes:
> vm=# create index "gist70000" on tmp_intarray_test using GIST (my_int_array gist__int_ops);
> CREATE INDEX
> Time: 2069836.856 ms

> Is that expected, or does it sound like a bug to take over
> half an hour to index 70000 rows of mostly 5 and 6-element
> integer arrays?

I poked at this example with oprofile.  It's entirely CPU-bound AFAICT,
and the CPU utilization is approximately

	55%	g_int_compress
	35%	memmove/memcpy (difficult to distinguish these)
	 1%	pg_qsort
	<1%	anything else

Probably need to look at reducing the number of calls to g_int_compress
... it must be getting called a whole lot more than once per new index
entry, and I wonder why that should need to be.

			regards, tom lane

In response to

Responses

pgsql-performance by date

Next:From: Simon RiggsDate: 2009-03-18 07:48:38
Subject: Re: Proposal of tunable fix for scalability of 8.4
Previous:From: Simon RiggsDate: 2009-03-18 00:43:23
Subject: Re: Proposal of tunable fix for scalability of 8.4

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