Thread: How to practice on EXPLAIN/optimizing queries/constructing indices
So I found https://wiki.postgresql.org/wiki/Using_EXPLAIN but still I feel there should be more to it. What methods can I use to actually get better at spotting issues with a query? How can I go from looking at a fancy EXPLAIN graph produced by PgAdmin and realize what the problem is (if there is one)?
Frequent postgresql blogger, depesz, did a great series on understanding the query planner. It helped me a lot
http://www.depesz.com/?s=explaining+the+unexplainable
http://www.depesz.com/?s=explaining+the+unexplainable
On Wed, Jul 9, 2014 at 4:24 PM, Magnus Persson <magnus.e.persson@gmail.com> wrote:
So I found https://wiki.postgresql.org/wiki/Using_EXPLAIN but still I feel there should be more to it.
What methods can I use to actually get better at spotting issues with a query? How can I go from looking at a fancy EXPLAIN graph produced by PgAdmin and realize what the problem is (if there is one)?
--
Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
On Wed, Jul 9, 2014 at 1:24 PM, Magnus Persson <magnus.e.persson@gmail.com> wrote: > So I found https://wiki.postgresql.org/wiki/Using_EXPLAIN but still I feel > there should be more to it. > What methods can I use to actually get better at spotting issues with a > query? How can I go from looking at a fancy EXPLAIN graph produced by > PgAdmin and realize what the problem is (if there is one)? There is a good set of articles by depesz that will give you some understanding: http://www.depesz.com/2013/04/16/explaining-the-unexplainable/ http://www.depesz.com/2013/04/27/explaining-the-unexplainable-part-2/ http://www.depesz.com/2013/04/27/explaining-the-unexplainable-part-3/ http://www.depesz.com/2013/04/27/explaining-the-unexplainable-part-4/ http://www.depesz.com/2013/04/27/explaining-the-unexplainable-part-5/ -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.com/in/grayhemp +1 (415) 867-9984, +7 (499) 346-7196, +7 (988) 888-1979 gray.ru@gmail.com