I am trying to get all the tables that the seq scan happens more than
select relname, seq_scan , idx_scan from pg_stat_user_tables where seq_scan > idx_scan order by 2 desc limit 10 ;
i am trying to get all the tables that the seq scan happens more than the index scan - is this query correct?
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Rajanikant HawaldarRank #107 · 20.6K reputationPosted Apr 5, 2021, 2:10 AM EDT
Rajanikant HawaldarRank #107 · 20.6K reputationPosted Apr 4, 2021, 6:39 AM EDT
Kousik52 reputationPosted Apr 5, 2021, 12:21 AM EDT