Re: oracle to psql migration - slow query in postgres

Поиск
Список
Период
Сортировка
От Maciek Sakrejda
Тема Re: oracle to psql migration - slow query in postgres
Дата
Msg-id AANLkTim+vgELuLpTipKiHctysTGUc8H1Ao+5GDmBBgde@mail.gmail.com
обсуждение исходный текст
Ответ на Re: oracle to psql migration - slow query in postgres  (Cédric Villemain <cedric.villemain.debian@gmail.com>)
Список pgsql-performance
>> This table has approximately 300million rows.
>
> and your query grab rows=236 660 930 of them. An index might be
> useless in this situation.

I want to point out that this is probably the most important comment
here. A couple of people have noted out that the index won't work for
this query, but more importantly, an index is (probably) not desirable
for this query. As an analogy (since everyone loves half-baked
programming analogies), if you want to find a couple of bakeries to
sponsor your MySQL Data Integrity Issues Awareness Walk by donating
scones, you use the yellow pages. If you want to hit up every business
in the area to donate whatever they can, you're better off canvasing
the neighborhood.
---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

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

Предыдущее
От: Tony Capobianco
Дата:
Сообщение: Re: oracle to psql migration - slow query in postgres
Следующее
От: Mladen Gogala
Дата:
Сообщение: Re: Slow count(*) again...