explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uqYS

Settings
# exclusive inclusive rows x rows loops node
1. 3.582 40,364.239 ↑ 1.0 10,000 1

Limit (cost=2,051,780.68..2,052,260.25 rows=10,000 width=32) (actual time=40,260.805..40,364.239 rows=10,000 loops=1)

2. 39.819 40,360.657 ↑ 1,796.8 90,000 1

Result (cost=2,047,944.12..9,802,991.80 rows=161,708,200 width=32) (actual time=39,512.288..40,360.657 rows=90,000 loops=1)

3. 24.330 40,320.838 ↑ 1,796.8 90,000 1

ProjectSet (cost=2,047,944.12..2,930,393.30 rows=161,708,200 width=40) (actual time=39,512.282..40,320.838 rows=90,000 loops=1)

4. 697.946 40,296.508 ↑ 40.5 39,926 1

GroupAggregate (cost=2,047,944.12..2,093,553.36 rows=1,617,082 width=76) (actual time=39,512.275..40,296.508 rows=39,926 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: 444,923
5. 2,130.117 39,598.562 ↑ 3.2 534,924 1

Sort (cost=2,047,944.12..2,052,176.74 rows=1,693,048 width=40) (actual time=39,512.197..39,598.562 rows=534,924 loops=1)

  • Sort Key: global_users.cid, global_users.works_id, global_users.username
  • Sort Method: external merge Disk: 74,528kB
6. 37,162.429 37,468.445 ↑ 1.0 1,645,234 1

Bitmap Heap Scan on global_users (cost=38,363.91..1,826,493.71 rows=1,693,048 width=40) (actual time=534.749..37,468.445 rows=1,645,234 loops=1)

  • Recheck Cond: (cid = ANY ('{12674,1826,12717,1}'::integer[]))
  • Filter: (global_user_type_id = 4)
  • Rows Removed by Filter: 7,999
  • Heap Blocks: exact=691,939
7. 306.016 306.016 ↑ 1.0 1,659,067 1

Bitmap Index Scan on idx_global_users_cid (cost=0.00..37,940.65 rows=1,705,384 width=0) (actual time=306.016..306.016 rows=1,659,067 loops=1)

  • Index Cond: (cid = ANY ('{12674,1826,12717,1}'::integer[]))
Planning time : 9.154 ms
Execution time : 40,384.536 ms