Ruslan,
Here are the results for this query:
=# EXPLAIN ANALYZE SELECT main.* FROM Users main
WHERE main.id IN (
SELECT main.id FROM Users main
CROSS JOIN ACL ACL_2
JOIN Principals Principals_1 ON ( Principals_1.id = main.id )
JOIN CachedGroupMembers CachedGroupMembers_3
FYI,
This change has not been made to DBIx::SearchBuilder::Handle::Pg
for the definition of DistinctQuery. I just checked and you can
simply use the same definition of DistinctQuery for PostgreSQL
that you are using for Oracle in DBIx::SearchBuilder::Handle::Oracle.
This make a substantial
We will be happy to improve Pg performance, however my simple tests on
almost Pg DB shows that new queries are slower. I'm comparing
execution plans at this point. Can you grab queries that benefit from
such change and send me execution plans with this patch and without.
On Tue, Dec 23, 2008 at
* almost empty Pg DB
On Wed, Dec 24, 2008 at 1:21 AM, Ruslan Zakirov
ruslan.zaki...@gmail.com wrote:
We will be happy to improve Pg performance, however my simple tests on
almost Pg DB shows that new queries are slower. I'm comparing
execution plans at this point. Can you grab queries that
Ruslan,
Here is a sample query that benefits from the change:
# EXPLAIN ANALYZE SELECT main.* FROM ( SELECT DISTINCT main.id FROM Users main
CROSS JOIN ACL ACL_2 JOIN Principals Principals_1 ON ( Principals_1.id =
main.id ) JOIN CachedGroupMembers CachedGroupMembers_3 ON (
I see how it can be improved without slowing more simple queries. Can
you test the following query for me? Send plan.
SELECT main.* FROM Users main
WHERE main.id IN (
SELECT main.id FROM Users main
CROSS JOIN ACL ACL_2
JOIN Principals Principals_1 ON ( Principals_1.id = main.id )
Dear DBIx::SearchBuilder developers:
Here is a re-send of a message that I posted in January of 2007
regarding a change in the DistinctQuery handling for PostgreSQL.
Using the version from the Oracle definition is a big performance
win. Would it be possible to include this change in the next