explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NsaW

Settings
# exclusive inclusive rows x rows loops node
1. 32.424 30,302.172 ↑ 3.9 2,562 1

Limit (cost=1,492,529.05..1,492,858.29 rows=10,000 width=4) (actual time=30,021.734..30,302.172 rows=2,562 loops=1)

2. 62.764 30,269.748 ↑ 23.5 42,562 1

Subquery Scan on t (cost=1,491,212.12..1,524,109.04 rows=999,199 width=4) (actual time=27,697.424..30,269.748 rows=42,562 loops=1)

3. 1,723.457 30,206.984 ↑ 23.5 42,562 1

GroupAggregate (cost=1,491,212.12..1,514,117.05 rows=999,199 width=75) (actual time=27,697.422..30,206.984 rows=42,562 loops=1)

  • Group Key: global_users.cid, global_users.works_id, global_users.username
  • Filter: (count(DISTINCT global_users.property_id) > 1)
  • Rows Removed by Filter: 810235
4. 2,358.009 28,483.527 ↑ 1.1 904,553 1

Sort (cost=1,491,212.12..1,493,794.71 rows=1,033,035 width=39) (actual time=27,697.334..28,483.527 rows=904,553 loops=1)

  • Sort Key: global_users.cid, global_users.works_id, global_users.username
  • Sort Method: quicksort Memory: 94268kB
5. 25,903.527 26,125.518 ↑ 1.1 904,553 1

Bitmap Heap Scan on global_users (cost=25,457.78..1,388,019.89 rows=1,033,035 width=39) (actual time=361.026..26,125.518 rows=904,553 loops=1)

  • Recheck Cond: (cid = ANY ('{14938,14732,14048,1592,1,1054,2031,1801,1094,1634,2393,132}'::integer[]))
  • Filter: (global_user_type_id = 4)
  • Rows Removed by Filter: 1735
  • Heap Blocks: exact=465126
6. 221.991 221.991 ↑ 1.1 909,716 1

Bitmap Index Scan on idx_global_users_cid (cost=0.00..25,199.52 rows=1,040,632 width=0) (actual time=221.991..221.991 rows=909,716 loops=1)

  • Index Cond: (cid = ANY ('{14938,14732,14048,1592,1,1054,2031,1801,1094,1634,2393,132}'::integer[]))
Planning time : 0.936 ms
Execution time : 30,316.215 ms