Last active
August 16, 2021 06:30
-
-
Save StevenJL/8442163b9ae9815efa37f22d7e44113c to your computer and use it in GitHub Desktop.
Revisions
-
StevenJL revised this gist
Feb 8, 2021 . 1 changed file with 19 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,24 @@ # See the 10 SELECT queries which touch the most number of rows. # These queries may benefit from adding indexes to reduce the number # of rows retrieved/affected. SELECT rows, # rows is the number of rows retrieved/affected by the query query FROM pg_stat_statements WHERE query iLIKE '%SELECT%' ORDER BY rows DESC LIMIT 10; # query | rows # --------+-------- # SELECT | 701724 # SELECT | 284772 # SELECT | 233914 # SELECT | 196424 # SELECT | 164421 # SELECT | 164419 # SELECT | 164419 # SELECT | 164419 # SELECT | 138395 # SELECT | 117636 # (10 rows) -
StevenJL created this gist
Jan 24, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ SELECT rows, query FROM pg_stat_statements WHERE query iLIKE '%SELECT%' ORDER BY rows DESC LIMIT 100;