Optimize the query, help me please.

Поиск
Список
Период
Сортировка
От Капралов Александр
Тема Optimize the query, help me please.
Дата
Msg-id CAJqqVEXfy4Q8XK=4OEn6kA7VPeO3Yzwc+Wsk5i-U9HO8EmamKQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Optimize the query, help me please.  (Raymond O'Donnell <rod@iol.ie>)
Re: Optimize the query, help me please.  (Bèrto ëd Sèra <berto.d.sera@gmail.com>)
Re: Optimize the query, help me please.  (Achilleas Mantzios <achill@matrix.gatewaynet.com>)
Список pgsql-general
Query is:
SELECT * FROM a UNION SELECT * FROM b  ORDER BY time DESC LIMIT 100

how can i get only last 100 row from a and b and then do union. Explain of select said that all recond selected from a and b.

thanks.

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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: autovacuum stuck on a table for 18+ hours, consuming lots of CPU time
Следующее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Optimize the query, help me please.