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)
Список
Дерево обсуждения
Random slow queries devel.brain99@xoxy.net
Re: Random slow queries Kevin Grittner <kgrittn@gmail.com>
Re: Random slow queries devel.brain99@xoxy.net
Re: Random slow queries Jim Nasby <Jim.Nasby@BlueTreble.com>
Re: Random slow queries Jeff Janes <jeff.janes@gmail.com>
Re: Random slow queries Tom Lane <tgl@sss.pgh.pa.us>
Re: Random slow queries Igor Neyman <ineyman@perceptron.com>
Re: Random slow queries devel.brain99@xoxy.net
Re: Random slow queries Tom Lane <tgl@sss.pgh.pa.us>
Re: Random slow queries devel.brain99@xoxy.net
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
Дата:
От: trafdev
Дата:
FAQ