Re: Comparing user attributes with bitwise operators - Mailing list pgsql-performance

From Josh Berkus
Subject Re: Comparing user attributes with bitwise operators
Date
Msg-id 200410050932.38595.josh@agliodbs.com
Whole thread Raw
In response to Re: Comparing user attributes with bitwise operators  (Patrick Clery <patrick@phpforhire.com>)
Responses Re: Comparing user attributes with bitwise operators
List pgsql-performance
Patrick,

First off, thanks for posting this solution!  I love to see a new demo of The
Power of Postgres(tm) and have been wondering about this particular problem
since it came up on IRC.

> The array method works quite nicely, especially for the
> columns like "languages" and "seeking" that are multiple choice. However,
> even though this method is fast, I still might opt for caching the results
> because the "real world" search query involves a lot more and will be
> executed non-stop. But to have it run this fast the first time certainly
> helps.

Now, for the bad news:  you need to test having a large load of users updating
their data.   The drawback to GiST indexes is that they are low-concurrency,
because the updating process needs to lock the whole index (this has been on
our TODO list for about a decade, but it's a hard problem).

--
Josh Berkus
Aglio Database Solutions
San Francisco

pgsql-performance by date:

Previous
From: Bill Montgomery
Date:
Subject: Excessive context switching on SMP Xeons
Next
From: Josh Berkus
Date:
Subject: Re: Excessive context switching on SMP Xeons