Changes

Jump to: navigation, search

Optimizing views in pgSQL

184 bytes added, 14:18, 6 August 2014
no edit summary
== Summary of recommendations ==__NOEDITSECTION__
'''Things to check before looking into rewriting the query itself:'''
* Gather Refresh the database statistics used by the query optimizer (to determine the best or a good query execution plan) by running the following command on the database:
<pre>
ANALYZE;
</pre>
There will be no visible output of that command, but the database statistics will be refreshed. Freshly updated database statistics can improve the performance of specific queries (especially after big changes - such as after heavy imports - when the automatic statistics gathering process has not yet run).
* Rebuilding the indexes on the affected table(s) by running the following command (specifying the index or table name):
<pre>
1,068
edits

Navigation menu