From: sverhagen <sverhagen@wps-nl.com>
To: pgsql-performance@postgresql.org
Subject: Re: Performance trouble finding records through related records
Date: Tue, 8 Mar 2011 03:17:42 -0800 (PST)
Message-ID: <1299583062773-3413801.post@n5.nabble.com> (raw)
In-Reply-To: <AANLkTinm8kKPtMxHtA2nY0S04i8t3vi8ci3qoXb3h18b@mail.gmail.com>
References: <1299024855300-3405914.post@n5.nabble.com>
<4D6DBC63.7080109@squeakycode.net>
<1299111156142-3407330.post@n5.nabble.com>
<4D6F054A.2090208@squeakycode.net>
<1299143960277-3407689.post@n5.nabble.com>
<4D6FABF1.50206@squeakycode.net>
<AANLkTinm8kKPtMxHtA2nY0S04i8t3vi8ci3qoXb3h18b@mail.gmail.com>
Hi. Thanks for your response.
Robert Haas wrote:
>
> Join Filter: ((events_events.transactionid)::text =
> (customerdetails.transactionid)::text)
>
> Now why is there a cast to text there on both sides? Do those two
> columns have exactly the same datatype? If not, you probably want to
> fix that, as it can make a big difference.
>
Good question. I seem not able to get rid of that, even though these are
same type:
=# \d events_events
Table "public.events_events"
Column | Type | Modifiers
----------------------+--------------------------+----------
[snip]
transactionid | character varying(36) | not null
[snip]
=# \d events_eventdetails
Table "public.events_eventdetails"
Column | Type | Modifiers
---------------+------------------------+----------
[snip]
transactionid | character varying(36) | not null
[snip]
(These columns allowing null or not is just something I've been playing with
to no avail too.)
Robert Haas wrote:
>
> Also, how many rows are there in events_events and how many in
> events_eventdetails?
>
select count(*) from events_events; --> 3910163
select count(*) from events_eventdetails; --> 30216033
select count(*) from events_eventdetails_customer_id; (single partition) -->
2976101
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Performance-trouble-finding-records-through-related-records-...
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: sverhagen@wps-nl.com
Subject: Re: Performance trouble finding records through related records
In-Reply-To: <1299583062773-3413801.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox