| От | Gregory Wood |
|---|---|
| Тема | Re: Database tuning |
| Дата | |
| Msg-id | 00df01c18a50$061a05b0$7889ffcc@comstock.com обсуждение исходный текст |
| Ответ на | Database tuning ("K Old" <kevsurf4@hotmail.com>) |
| Список | pgsql-general |
> SELECT > books.book_name, bible.chapter, bible.verse, bible.versetext > FROM asv_bible bible, book_bible books WHERE bible.book = books.id ORDER BY > random() LIMIT 1 > I was wondering if anyone could offer any help with lowering the time it > takes to run? I didn't see anything in your schema about an index on asv_bible.book (book_bible.id is a primary key therefore an index is created implicitly). Without an index on the book column, the join is going to take some time. I would put an index on that and do a VACUUM ANALYZE. You should see a huge speedup from that alone. Greg
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера