Re: Query Tuning

From: Michael Lewis <mlewis(at)entrata(dot)com>
To: Sonam Sharma <sonams1209(at)gmail(dot)com>, pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Query Tuning
Date: 2019-10-02 19:32:24
Message-ID: CAHOFxGqHEMzCrtAwY2UZGBvmJL2PCkmw9agPAfcdZ4vpuJDF_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Both of the below visualizers can help, but require some knowledge about
comparing estimated vs actual row estimates, disk sorts vs in memory,
etc. Drawing implications about whether your schema needs to change or just
the query will take time to master as well.

http://tatiyants.com/pev/#/plans/new --data only stored locally on your
computer, nice for security but not great for sharing with others and
getting help, since you need to share full json output (and query ideally)

https://explain.depesz.com/ --URL is unique and sharable for help from
others

Often you need to provide much more information to get good advice. What
version of Postgres are you on? What are stats like for the involved
tables? What other indexes are available or might you add? What is the use
of this system-- single user or thousands? Heavy writes continually, or
load & analysis? Can you share the full query text and output of EXPLAIN
ANALYZE on it?

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Enrico Thierbach 2019-10-02 20:09:52 partitions vs indexes
Previous Message Ron 2019-10-02 18:52:54 Re: Drop a primary