explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2fNg

Settings
# exclusive inclusive rows x rows loops node
1. 132.733 1,614.672 ↓ 301.2 99,996 1

GroupAggregate (cost=126,426.13..127,827.61 rows=332 width=8) (actual time=1,395.254..1,614.672 rows=99,996 loops=1)

  • Group Key: line_item_id
  • Filter: (count(*) = 3)
  • Rows Removed by Filter: 900000
2. 235.993 1,481.939 ↓ 15.8 1,199,988 1

Sort (cost=126,426.13..126,616.44 rows=76,123 width=8) (actual time=1,395.227..1,481.939 rows=1,199,988 loops=1)

  • Sort Key: line_item_id
  • Sort Method: external merge Disk: 21216kB
3. 1,154.275 1,245.946 ↓ 15.8 1,199,988 1

Bitmap Heap Scan on meta_data_field_values (cost=2,004.49..120,254.06 rows=76,123 width=8) (actual time=100.574..1,245.946 rows=1,199,988 loops=1)

  • Recheck Cond: (((meta_data_field_id = 6) AND (value = '100'::text)) OR ((meta_data_field_id = 7) AND (value = '81'::text)) OR ((meta_data_field_id = 9) AND (value = '26'::text)))
  • Rows Removed by Index Recheck: 8322214
  • Heap Blocks: exact=63487 lossy=65925
4. 0.009 91.671 ↓ 0.0 0 1

BitmapOr (cost=2,004.49..2,004.49 rows=76,172 width=0) (actual time=91.671..91.671 rows=0 loops=1)

5. 14.284 14.284 ↓ 14.8 99,996 1

Bitmap Index Scan on meta_data_field_values_idx (cost=0.00..176.26 rows=6,770 width=0) (actual time=14.284..14.284 rows=99,996 loops=1)

  • Index Cond: ((meta_data_field_id = 6) AND (value = '100'::text))
6. 11.262 11.262 ↓ 15.9 99,996 1

Bitmap Index Scan on meta_data_field_values_idx (cost=0.00..163.30 rows=6,274 width=0) (actual time=11.262..11.262 rows=99,996 loops=1)

  • Index Cond: ((meta_data_field_id = 7) AND (value = '81'::text))
7. 66.116 66.116 ↓ 15.8 999,996 1

Bitmap Index Scan on meta_data_field_values_idx (cost=0.00..1,607.83 rows=63,127 width=0) (actual time=66.116..66.116 rows=999,996 loops=1)

  • Index Cond: ((meta_data_field_id = 9) AND (value = '26'::text))
Planning time : 0.182 ms
Execution time : 1,619.218 ms