Re: Tuning to speed select
От | Alban Hertroys |
---|---|
Тема | Re: Tuning to speed select |
Дата | |
Msg-id | 44DB0083.6060608@magproductions.nl обсуждение исходный текст |
Ответ на | Re: Tuning to speed select (Richard Broersma Jr <rabroersma@yahoo.com>) |
Список | pgsql-general |
Richard Broersma Jr wrote: >> Views certainly help in managing complexity. They do nothing to improve >> query-speed. >> >> Querying a view gets rewritten to queries to the underlying tables on the >> fly. >> (as long as there are no materialized views, which are still on a the TODO >> list) > > Would partial indexs on the most queried regions of the table help in query speed? They would, as long as they can be used in the client application queries. If all the data is often used (partially or not), then there's little point to partial indices. But that's a border-case. In common, they can make major differences. Also, make sure you add enough constraints to your query so that the partial index constraints match your query constraints, otherwise the index will not be used. Another point to check; make sure you don't cause type casts over indexed columns. That might (under certain conditions) cause a type cast on the column value of every indexed row, which does slow down things significantly. I believe this was solved in PostgreSQL 8.something. -- Alban Hertroys alban@magproductions.nl magproductions b.v. T: ++31(0)534346874 F: ++31(0)534346876 M: I: www.magproductions.nl A: Postbus 416 7500 AK Enschede // Integrate Your World //
В списке pgsql-general по дате отправления: