explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W5N

Settings
# exclusive inclusive rows x rows loops node
1. 756.565 1,197.258 ↑ 1.0 1,000,002 1

Sort (cost=322,190.86..324,695.94 rows=1,002,032 width=118) (actual time=930.463..1,197.258 rows=1,000,002 loops=1)

  • Sort Key: title
  • Sort Method: external merge Disk: 70368kB
2. 324.818 440.693 ↑ 1.0 1,000,002 1

Bitmap Heap Scan on labels (cost=33,522.20..99,017.84 rows=1,002,032 width=118) (actual time=117.664..440.693 rows=1,000,002 loops=1)

  • Recheck Cond: ((group_id = 2) OR (((type)::text = 'ProjectLabel'::text) AND (project_id = 1)))
  • Filter: ((((type)::text = 'GroupLabel'::text) AND (group_id = 2)) OR (((type)::text = 'ProjectLabel'::text) AND (project_id = 1)))
  • Heap Blocks: exact=11366
3. 0.001 115.875 ↓ 0.0 0 1

BitmapOr (cost=33,522.20..33,522.20 rows=1,002,032 width=0) (actual time=115.875..115.875 rows=0 loops=1)

4. 0.049 0.049 ↑ 1.0 1 1

Bitmap Index Scan on index_labels_on_group_id_and_project_id_and_title (cost=0.00..4.44 rows=1 width=0) (actual time=0.049..0.049 rows=1 loops=1)

  • Index Cond: (group_id = 2)
5. 115.825 115.825 ↑ 1.0 1,000,001 1

Bitmap Index Scan on index_labels_on_type_and_project_id (cost=0.00..33,016.75 rows=1,002,032 width=0) (actual time=115.825..115.825 rows=1,000,001 loops=1)

  • Index Cond: (((type)::text = 'ProjectLabel'::text) AND (project_id = 1))