Re: table alias on update, another update question

Поиск
Список
Период
Сортировка
От nolan@celery.tssi.com
Тема Re: table alias on update, another update question
Дата
Msg-id 20030624163330.6557.qmail@celery.tssi.com
обсуждение исходный текст
Ответ на Re: table alias on update, another update question  (Bruno Wolff III <bruno@wolff.to>)
Список pgsql-general
> I think something like the following is best. I rewrote the max and min
> functions in a way that will work well if there is a combined index on
> t2_key and t2_col1 as well as t2_key and t2_col2. Another approach would
> be to join to a group by select from table2. There may be some circumstances
> where that gives you better performance, but I can't think of a particular
> circumstance where that is likely offhand.

I hadn't thought of using LIMIT in that context, a nice trick to remember!

That worked fairly well even with an index just on the keys.  It took
about the same time as just loading the data from the first record in
each key group.
--
Mike Nolan

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

Предыдущее
От: "Reuben D. Budiardja"
Дата:
Сообщение: Re: [pgsql-advocacy] Documentation quality WAS: interesting
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: Selecting dupes from table