Re: improving performance of UNION and ORDER BY

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: improving performance of UNION and ORDER BY
Дата
Msg-id 20020304082332.E76685-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: improving performance of UNION and ORDER BY  (Chris Gamache <cgg007@yahoo.com>)
Список pgsql-general
On Mon, 4 Mar 2002, Chris Gamache wrote:

> That cut the query down to 6 seconds. About 5 seconds longer than I would like
> it. I'll take any performance increase, tho. I tried SET enable_seqscan=off;
> And it takes 8 seconds. Strange indeed.
>
> The reason I don't put the two tables together is that the tables don't have
> the exact same structure... I suppose I could merge the two, but it would be
> counterintuitive to logically apply some fields in table a to data collected
> for table b. Plus, I do so many more operations on the single tables than the
> joined tables that it wouldn't make good use of programming time to rewrite all
> the single table ops.
>
> I know... excuses, excuses! Thanks for the input. Any more ideas?

Are there going to possibly be equal rows in the two parts that you need
to merge into one row? If not, try union all which should get rid of a
sort and unique I think.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: backend closed
Следующее
От: Doug McNaught
Дата:
Сообщение: Re: postgre performance question