Limit (cost=34380.87..34380.97 rows=40 width=94) (actual time=96.698..96.753 rows=40 loops=1) -> Sort (cost=34380.87..34381.16 rows=115 width=94) (actual time=96.696..96.712 rows=40 loops=1) Sort Key: count(m.post_id) -> HashAggregate (cost=34375.50..34376.94 rows=115 width=94) (actual time=85.320..89.064 rows=3688 loops=1) -> Hash Join (cost=10298.29..34374.35 rows=115 width=94) (actual time=35.783..71.702 rows=8957 loops=1) Hash Cond: ("outer".post_id = "inner".post_id) -> Bitmap Heap Scan on dc_meta m (cost=336.93..24341.33 rows=9401 width=58) (actual time=3.812..26.720 rows=9156 loops=1) Recheck Cond: ((blog_id)::text = 'b4c62627b3203e7780078cf2f6373ab5'::text) Filter: ((meta_type)::text = 'tag'::text) -> Bitmap Index Scan on dc_idx_meta_blog_id (cost=0.00..336.93 rows=9407 width=0) (actual time=3.168..3.168 rows=9156 loops=1) Index Cond: ((blog_id)::text = 'b4c62627b3203e7780078cf2f6373ab5'::text) -> Hash (cost=9954.92..9954.92 rows=2577 width=44) (actual time=31.918..31.918 rows=3038 loops=1) -> Bitmap Heap Scan on dc_post p (cost=35.51..9954.92 rows=2577 width=44) (actual time=2.508..28.751 rows=3038 loops=1) Recheck Cond: (((blog_id)::text = 'b4c62627b3203e7780078cf2f6373ab5'::text) AND (post_status = 1)) Filter: (post_password IS NULL) -> Bitmap Index Scan on dc_idx_blog_post_post_status (cost=0.00..35.51 rows=2584 width=0) (actual time=1.650..1.650 rows=3038 loops=1) Index Cond: (((blog_id)::text = 'b4c62627b3203e7780078cf2f6373ab5'::text) AND (post_status = 1)) Total runtime: 97.191 ms