Re: [PERFORM] Re: GROUP BY with reasonable timings in PLAN but unreasonable execution time

2011-08-04 Thread Clem Dickey
NUM_DISTINCT_DEFINED(nd) ((nd).value >= 0) #define NUM_DISTINCT_VALUE(nd) ((nd).value) - Clem Dickey P.S. Congratulations on displacing MySQL in Mac OS X Lion Server. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] Planner choosing NestedLoop, although it is slower...

2011-07-14 Thread Clem Dickey
On 07/12/2011 11:11 AM, Mario Splivalo wrote: Hi, all. I have a query, looking like this: SELECT pub_date FROM tubesite_object INNER JOIN tubesite_image ON tubesite_image.object_ptr_id = tubesite_object.id WHERE tubesite_object.site_id = 8 AND tubesite_object.pub_date < E'2011-07-12 13:25:00' OR

[PERFORM] Re: GROUP BY with reasonable timings in PLAN but unreasonable execution time

2011-07-10 Thread Clem Dickey
On 07/06/2011 05:59 PM, Clem Dickey wrote: On 07/05/2011 07:26 PM, Clem Dickey wrote: Column | Type | Modifiers +-+--- y | integer | not null x | integer | not null k | integer | not null j | integer | not null z | integer | not null Indexes: "t_pkey" PRIMARY

[PERFORM] Re: GROUP BY with reasonable timings in PLAN but unreasonable execution time

2011-07-07 Thread Clem Dickey
On 07/05/2011 07:26 PM, Clem Dickey wrote: Updates after belatedly reading the "slow queries" guidelines: Version: PostgreSQL 8.4.8 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2), 64-bit The query has always been slow; the table for this te

[PERFORM] GROUP BY with reasonable timings in PLAN but unreasonable execution time

2011-07-06 Thread Clem Dickey
t GROUP BY j,k,x,y,z ) AS f NATURAL JOIN t; With 120 permutations, I didn't try them all. I should note that the plans tend to have similar costs, so the query planner presumably does not know that some permutations have significantly greater execution times. Clem Dickey -- Sent v