Re: same plan, add 1 condition, 1900x slower - Mailing list pgsql-performance

From Tom Lane
Subject Re: same plan, add 1 condition, 1900x slower
Date
Msg-id 18036.1131718176@sss.pgh.pa.us
Whole thread Raw
In response to Re: same plan, add 1 condition, 1900x slower  (Mitch Skinner <mitch@egcrc.net>)
List pgsql-performance
Mitch Skinner <mitch@egcrc.net> writes:
> On Thu, 2005-11-10 at 12:23 -0500, Tom Lane wrote:
>> Apparently, you are using a platform and/or locale in which strcoll() is
>> spectacularly, god-awfully slow --- on the order of 10 msec per comparison.

> The version with the condition is definitely doing more I/O.  The
> version without the condition doesn't read at all.

That's pretty interesting, but what file(s) is it reading exactly?

It could still be strcoll's fault.  The only plausible explanation
I can think of for strcoll being so slow is if for some reason it were
re-reading the locale definition file every time, instead of setting up
just once.

If it is hitting Postgres files, it'd be interesting to look at exactly
which files and what the distribution of seek offsets is.

            regards, tom lane

pgsql-performance by date:

Previous
From: Richard Huxton
Date:
Subject: Re: same plan, add 1 condition, 1900x slower
Next
From: Tom Lane
Date:
Subject: Re: same plan, add 1 condition, 1900x slower