Re: Insert Performance

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: Insert Performance
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA4887A39@m0114.s-mxs.net
обсуждение исходный текст
Ответ на Insert Performance  ("Michael Paesold" <mpaesold@gmx.at>)
Список pgsql-hackers
> What could you recommend? Locking the table and selecting
> max(invoice_id) wouldn't really be much faster, with max(invoice_id)
> not using an index...

select invoice_id from table order by invoice_id desc limit 1;

should get you the maximum fast if you have a unique index on invoice_id.

Andreas


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

Предыдущее
От: "Zeugswetter Andreas SB SD"
Дата:
Сообщение: Re: AIX compilation problems (was Re: Proposal ...)
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: PGXLOG variable worthwhile?