Re: Performance trouble finding records through related records

Поиск
Список
Период
Сортировка
От sverhagen
Тема Re: Performance trouble finding records through related records
Дата
Msg-id 1299583062773-3413801.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Performance trouble finding records through related records  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-performance
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-tp3405914p3413801.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.

В списке pgsql-performance по дате отправления:

Предыдущее
От: Andreas Forø Tollefsen
Дата:
Сообщение: Re: Performance issues
Следующее
От: sverhagen
Дата:
Сообщение: Re: Performance trouble finding records through related records