Re: A slow query - Help please?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: A slow query - Help please?
Дата
Msg-id 9e4684ce0606170312g5a1107bah9c51ca8969d01cb@mail.gmail.com
обсуждение исходный текст
Ответ на Re: A slow query - Help please?  (Alban Hertroys <alban@magproductions.nl>)
Ответы Re: A slow query - Help please?
Re: A slow query - Help please?
Список pgsql-general
On 6/16/06, Alban Hertroys <alban@magproductions.nl> wrote:
We really need this solved. Isn't anybody able to shed some light on
this? Is it possible to make this query use an index scan, preferably
w/o disabling sequential scanning?

ditch the inheritance. it is no good, and makes everything too complicated to work with.

in case you can't, do something similar to this:

select * from
(
select * from only table_a  order by number desc limit 25
union
select * from only table_b  order by number desc limit 25
union
select * from only table_c  order by number desc limit 25
) x
order by number desc limit 25;

it should be faster. and yes, i know it's ugly.

depesz

--
http://www.depesz.com/ - nowy, lepszy depesz

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

Предыдущее
От: "Umut Sargut"
Дата:
Сообщение: problem in loading a jar file
Следующее
От: "P.M"
Дата:
Сообщение: phppgadmin 4.0.1