Re: slow query to improve performace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 25, 2022 at 3:18 PM Ayub Khan <ayub.hp@xxxxxxxxx> wrote:
Hi,

Could some some verify the attached query to verify the performance and suggest some steps to improve it, this query is created as a view. This view is used to get the aggregates of orders based on its current status

I don't see how it is possible for that query to yield that plan. For example, what part of that query could have been transformed into this part of the plan "order_status_code <> ALL ('{T,J,C,D}'::bpchar[])"?

Well, I suppose some of the tables used in that query could themselves be views over the same tables?  In that case, we might need to know the definitions of those views.  As well as knowing the version, and seeing the EXPLAIN (ANALYZE, BUFFERS) for the query, run after track_io_timing is turned on.

Cheers,

Jeff

[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux