| От | sarloc@jevic.com (Carmen) |
|---|---|
| Тема | Poor performance on a right join |
| Дата | |
| Msg-id | c8ae6a4.0303131612.270f150a@posting.google.com обсуждение |
| Ответы |
Re: Poor performance on a right join
|
| Список | pgsql-sql |
When doing a join query I am getting a responce time of 3 seconds. The callhist table has 66000 rows and the phone table has 10000 rows. I have an indexes on callhist.call_date, callhist.operator_id, phone.phone, & phone.cust_code. Here's the SQL SELECT a.CALL_DATE, a.OPERATOR_ID, a.CUST_CODE FROM PHONE as b right join CALLHIST as a on (a.CUST_CODE=b.CUST_CODE) where (b.PHONE = '555-555-5555') order by a.call_date desc; The postgres db is running on a 2 P3 700 processor server with 1GB of ram running Red Hat Linux 7.3. I am running PostgreSQL 7.2.2 Why is the query taking so long? What can I do to help the performance? Thanks in advance, Carmen
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера