explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iLc5

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 346.610 ↓ 1.7 19 1

Unique (cost=1,859,658,740.51..1,859,658,740.59 rows=11 width=77) (actual time=346.598..346.610 rows=19 loops=1)

2. 0.128 346.598 ↓ 1.7 19 1

Sort (cost=1,859,658,740.51..1,859,658,740.54 rows=11 width=77) (actual time=346.596..346.598 rows=19 loops=1)

  • Sort Key: document_types.name, document_types.id
  • Sort Method: quicksort Memory: 28kB
3. 15.130 346.470 ↓ 1.7 19 1

Seq Scan on document_types (cost=0.00..1,859,658,740.32 rows=11 width=77) (actual time=336.787..346.470 rows=19 loops=1)

  • Filter: ((ent_id = 1500) AND ((document_code)::text = 'pay_docs_in_document'::text) AND (NOT (alternatives: SubPlan 1 or hashed SubPlan 2)))
  • Rows Removed by Filter: 51432
4.          

SubPlan (for Seq Scan)

5. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=38.18..36,144.23 rows=1 width=0) (never executed)

6. 0.000 0.000 ↓ 0.0 0

Seq Scan on document_operations u1 (cost=0.00..36,102.03 rows=1 width=4) (never executed)

  • Filter: ((document_type_id = document_types.id) AND (ent_id = 1500))
7. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on document_acc_entry_template u0 (cost=38.18..42.19 rows=1 width=4) (never executed)

  • Recheck Cond: ((operation_id = u1.id) AND (yc_function IS NOT NULL))
8. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=38.18..38.18 rows=1 width=0) (never executed)

9. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on document_acc_entry_template_operation_id (cost=0.00..4.84 rows=54 width=0) (never executed)

  • Index Cond: (operation_id = u1.id)
10. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on document_acc_entry_template_yc_function_9aa246a4 (cost=0.00..32.68 rows=1,633 width=0) (never executed)

  • Index Cond: (yc_function IS NOT NULL)
11. 2.036 331.340 ↓ 1.1 13 1

Hash Join (cost=6,044.30..40,551.82 rows=12 width=4) (actual time=19.664..331.340 rows=13 loops=1)

  • Hash Cond: (u1_1.id = u0_1.operation_id)
12. 325.549 325.549 ↑ 1.0 5,624 1

Seq Scan on document_operations u1_1 (cost=0.00..34,097.69 rows=5,853 width=8) (actual time=0.766..325.549 rows=5,624 loops=1)

  • Filter: (ent_id = 1500)
  • Rows Removed by Filter: 796111
13. 0.640 3.755 ↓ 1.3 2,144 1

Hash (cost=6,023.89..6,023.89 rows=1,633 width=4) (actual time=3.755..3.755 rows=2,144 loops=1)

  • Buckets: 4096 (originally 2048) Batches: 1 (originally 1) Memory Usage: 108kB
14. 2.838 3.115 ↓ 1.3 2,144 1

Bitmap Heap Scan on document_acc_entry_template u0_1 (cost=33.09..6,023.89 rows=1,633 width=4) (actual time=0.388..3.115 rows=2,144 loops=1)

  • Recheck Cond: (yc_function IS NOT NULL)
  • Heap Blocks: exact=757
15. 0.277 0.277 ↓ 1.3 2,144 1

Bitmap Index Scan on document_acc_entry_template_yc_function_9aa246a4 (cost=0.00..32.68 rows=1,633 width=0) (actual time=0.277..0.277 rows=2,144 loops=1)

  • Index Cond: (yc_function IS NOT NULL)
Planning time : 2.264 ms
Execution time : 346.847 ms