Re: Assistance with optimizing query - same SQL, different category_id = Seq Scan
В списке pgsql-performance по дате отправления:
| От | Jim C. Nasby |
|---|---|
| Тема | Re: Assistance with optimizing query - same SQL, different category_id = Seq Scan |
| Дата | |
| Msg-id | 20060511220802.GU99570@pervasive.com обсуждение исходный текст |
| Ответ на | Assistance with optimizing query - same SQL, different category_id = Seq Scan (Brendan Duddridge <brendan@clickspace.com>) |
| Список | pgsql-performance |
On Mon, May 08, 2006 at 07:29:32PM -0600, Brendan Duddridge wrote: > Do you have any suggestions on how I can optimize the query so both > versions of the query come back fast without doing a sequential scan > on the price table? Well, before you do anything you should verify that an index scan in the second case would actually be faster. Set enable_seqscan=off and check that. After that, you can favor an index scan by (in order of effectiveness) increasing the correlation on the appropriate index (by clustering on it), lowering random_page_cost, or increasing effective_cache_size. -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера