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
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
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
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
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