From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron Mayer <rm_pg@cheapcomplexdevices.com>
Cc: Oleg Bartunov <oleg@sai.msu.su>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Cc: pgsql-performance@postgreSQL.org
Subject: Re: Extremely slow intarray index creation and inserts.
Date: Tue, 17 Mar 2009 23:24:59 -0400
Message-ID: <1804.1237346699@sss.pgh.pa.us> (raw)
In-Reply-To: <49BFEBD3.4000006@cheapcomplexdevices.com>
References: <49BFD950.5040905@cheapcomplexdevices.com>
<49BFEBD3.4000006@cheapcomplexdevices.com>
Ron Mayer <rm_pg@cheapcomplexdevices.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
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, rm_pg@cheapcomplexdevices.com, oleg@sai.msu.su, teodor@sigaev.ru
Subject: Re: Extremely slow intarray index creation and inserts.
In-Reply-To: <1804.1237346699@sss.pgh.pa.us>
* 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