Re: Resources

Поиск
Список
Период
Сортировка
От Nick Fankhauser
Тема Re: Resources
Дата
Msg-id NEBBLAAHGLEEPCGOBHDGEEOKECAA.nickf@ontko.com
обсуждение исходный текст
Ответ на Re: Resources  (Frank Bax <fbax@sympatico.ca>)
Ответы Re: Resources  (Chester Carlton Young <chestercyoung@yahoo.com>)
Список pgsql-sql
> Sorry, I made too general a statement.  Index will help when the expession

...and I didn't notice that Gurudutt's LIKE wasn't anchored to the front.
oops- mea culpa.

Taking a second look then, the LIKE is probably very costly.

Take a look at the section in the Docs on making explicit joins. If the date
check significantly constrains the results, index it & then make sure that
constraint gets evaluated first, then the sequential scan on the address has
less to scan. This might help a lot.

The doc page for explicit joins:
http://www.postgresql.org/idocs/index.php?explicit-joins.html

You mention that it may be too late to change the tables, but I guess that's
where I'd look next- I once had a similar situation when I worked for an
electric utility & we ended up parsing the address lines to find road names
& numbers and then loading them into special indexed fields just used for
sorting. If you control the input app, maybe you could even have the user
enter the fields you want to query on separately.


-Nick




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

Предыдущее
От: jtp
Дата:
Сообщение: Re: Resources
Следующее
От: "Peter T. Brown"
Дата:
Сообщение: Re: Temporary tables