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
[EMAIL PROTECTED]

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 //

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org

Reply via email to