Poor performance on a PostgreSQL query

前端 未结 2 959
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-21 02:10

UPDATE: Just occurred to me: Is it possible that pgAdmin counts not the actual time of the query, but the time required to draw the results in the grid?

I just executed

相关标签:
2条回答
  • 2021-01-21 02:41

    To get execution time on the server without data transfer to the client, use EXPLAIN ANALYZE.

    Or use the keyboard shortcut in the pgAdmin query tool: SHIFTF7 (depending on your OS and version, check the query menu for keyboard shortcut).

    BTW, if you consult the pgAdmin manual, use the current release - 1.18 as of now:
    http://www.pgadmin.org/docs/1.18/query.html

    0 讨论(0)
  • 2021-01-21 02:59

    You are measuring the time it takes to transfer the rows to pgAdmin:

    http://www.pgadmin.org/docs/1.4/query.html

    " If a dataset was returned, not only the elapsed time for server execution is displayed, but also the time to retrieve the data from the server to the Data Output page."

    If you try a "select count(*) from sometable" it will as fast as the old pc.

    0 讨论(0)
提交回复
热议问题