explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kNm6

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.206 ↓ 0.0 0 1

Nested Loop (cost=16,516.54..17,604.05 rows=1,483 width=13) (actual time=0.206..0.206 rows=0 loops=1)

2. 0.001 0.206 ↓ 0.0 0 1

Nested Loop (cost=16,516.11..16,907.06 rows=1,483 width=8) (actual time=0.205..0.206 rows=0 loops=1)

3. 0.000 0.205 ↓ 0.0 0 1

Unique (cost=16,515.67..16,515.70 rows=6 width=4) (actual time=0.205..0.205 rows=0 loops=1)

4. 0.132 0.205 ↓ 0.0 0 1

Sort (cost=16,515.67..16,515.69 rows=6 width=4) (actual time=0.205..0.205 rows=0 loops=1)

  • Sort Key: u0.id
  • Sort Method: quicksort Memory: 25kB
5. 0.003 0.073 ↓ 0.0 0 1

Nested Loop (cost=0.86..16,515.59 rows=6 width=4) (actual time=0.073..0.073 rows=0 loops=1)

6. 0.070 0.070 ↓ 0.0 0 1

Index Scan using os_spec_info_date_next on os_spec u0 (cost=0.43..4,216.77 rows=1,510 width=8) (actual time=0.070..0.070 rows=0 loops=1)

  • Index Cond: (info_date_next >= '9999-12-31 23:59:59'::timestamp without time zone)
  • Filter: ((info_date <= '9999-12-31 23:59:59'::timestamp without time zone) AND (date_register <= '2020-12-31'::date) AND ((date_discard >= '2020-01-01'::date) OR (date_discard IS NULL)))
  • Rows Removed by Filter: 3
7. 0.000 0.000 ↓ 0.0 0

Index Scan using os_card_pkey on os_card u1 (cost=0.43..8.14 rows=1 width=4) (never executed)

  • Index Cond: (id = u0.os_id)
  • Filter: ((ent_id = 4781) AND (state = ANY ('{2,3,4,5,6,7}'::integer[])))
8. 0.000 0.000 ↓ 0.0 0

Index Scan using os_spec_invnumber_os_spec_id on os_spec_invnumber (cost=0.44..62.75 rows=247 width=8) (never executed)

  • Index Cond: (os_spec_id = u0.id)
  • Filter: (state <> 3)
9. 0.000 0.000 ↓ 0.0 0

Index Scan using invnumber_pkey on invnumber (cost=0.43..0.47 rows=1 width=13) (never executed)

  • Index Cond: (id = os_spec_invnumber.invnum_id)
Planning time : 2,130.643 ms
Execution time : 0.569 ms