explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JVa5 : Optimization for: plan #rcI4

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.002 1.032 ↓ 0.0 0 1

Limit (cost=532,283.89..532,283.89 rows=1 width=153) (actual time=1.032..1.032 rows=0 loops=1)

2. 0.010 1.030 ↓ 0.0 0 1

Sort (cost=532,283.89..532,283.89 rows=1 width=153) (actual time=1.030..1.030 rows=0 loops=1)

  • Sort Key: bill_item_parent.date, bill_item_parent.id
  • Sort Method: quicksort Memory: 25kB
3. 0.001 1.020 ↓ 0.0 0 1

Nested Loop (cost=0.98..532,283.88 rows=1 width=153) (actual time=1.020..1.020 rows=0 loops=1)

  • Join Filter: (bill_item_parent.bill_id = bill1_.id)
4. 0.000 1.019 ↓ 0.0 0 1

Nested Loop Anti Join (cost=0.98..530,287.43 rows=1 width=145) (actual time=1.019..1.019 rows=0 loops=1)

5. 0.001 1.019 ↓ 0.0 0 1

Append (cost=0.42..86,575.28 rows=58,996 width=145) (actual time=1.019..1.019 rows=0 loops=1)

6. 0.101 0.101 ↓ 0.0 0 1

Index Scan using public_bill_item_n_bill_id2_idx on bill_item_parent (cost=0.42..5,684.23 rows=8,812 width=137) (actual time=0.101..0.101 rows=0 loops=1)

  • Index Cond: (bill_id = ANY ('{656023,656022,654936,654927,654926,654925,654933,656026,654930,654929,654937,656031,656024,654928}'::bigint[]))
  • Filter: ((NOT hide) AND (NOT cobilling) AND (company_id = 426))
7. 0.057 0.057 ↓ 0.0 0 1

Index Scan using bill_item_426_company_id_bill_id_billing_relative_month_idx on bill_item_426 (cost=0.43..80,820.62 rows=50,182 width=146) (actual time=0.057..0.057 rows=0 loops=1)

  • Index Cond: ((company_id = 426) AND (bill_id = ANY ('{656023,656022,654936,654927,654926,654925,654933,656026,654930,654929,654937,656031,656024,654928}'::bigint[])))
  • Filter: ((NOT hide) AND (NOT cobilling))
8. 0.041 0.041 ↓ 0.0 0 1

Index Scan using bill_item_print_company_id_ix on bill_item_print (cost=0.29..4.32 rows=1 width=1,657) (actual time=0.041..0.041 rows=0 loops=1)

  • Index Cond: (company_id = 426)
  • Filter: ((NOT hide) AND (NOT cobilling) AND (bill_id = ANY ('{656023,656022,654936,654927,654926,654925,654933,656026,654930,654929,654937,656031,656024,654928}'::bigint[])))
9. 0.819 0.819 ↓ 0.0 0 1

Index Scan using idx_bill_item_telecom_employee_bill_rel_month on bill_item_telecom_employee (cost=0.43..66.10 rows=1 width=122) (actual time=0.819..0.819 rows=0 loops=1)

  • Index Cond: (bill_id = ANY ('{656023,656022,654936,654927,654926,654925,654933,656026,654930,654929,654937,656031,656024,654928}'::bigint[]))
  • Filter: ((NOT hide) AND (NOT cobilling) AND (company_id = 426))
10. 0.000 0.000 ↓ 0.0 0

Index Only Scan using bill_item_audit_uk on bill_item_audit billitemau2_ (cost=0.56..7.51 rows=1 width=33) (never executed)

  • Index Cond: (bill_item_id = (bill_item_parent.id)::text)
  • Heap Fetches: 0
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on bill bill1_ (cost=0.00..1,516.20 rows=38,420 width=16) (never executed)

Planning time : 534.439 ms
Execution time : 1.257 ms