Re: Random slow queries

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: Random slow queries
Дата
Msg-id 18c5074b-be58-3754-fab9-e07abcb17326@BlueTreble.com
обсуждение исходный текст
Ответ на Re: Random slow queries  (devel.brain99@xoxy.net)
Список pgsql-performance
On 6/29/16 1:01 PM, devel.brain99@xoxy.net wrote:
> During my test run, there was one offending query invocation, a simple
> SELECT * FROM job WHERE field = $1
> Of course the actual query specified the list of fields as it was generated
> by Hibernate, but that is what it boils down to - no joins etc. The column on
> which was queried is a VARCHAR(64) NOT NULL, not unique nor indexed (though
> in practice most values are unique).

Be careful about your assumptions there... SELECT * can have redically
different performance than selecting individual fields. In particular,
if you select something that's been toasted external, that's going to
produce it's own index scan of the toast table, which could then run
into conflicts with vacuuming.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)   mobile: 512-569-9461


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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: Seeing execution plan of foreign key constraint check?
Следующее
От: trafdev
Дата:
Сообщение: Re: less than 2 sec for response - possible?