explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jhqP

Settings
# exclusive inclusive rows x rows loops node
1. 0.026 4,477.743 ↑ 1.0 200 1

Limit (cost=179,441.36..179,441.86 rows=200 width=1,131) (actual time=4,477.649..4,477.743 rows=200 loops=1)

  • Buffers: shared hit=95852
2. 281.752 4,477.717 ↑ 1,335.9 200 1

Sort (cost=179,441.36..180,109.3 rows=267,174 width=1,131) (actual time=4,477.647..4,477.717 rows=200 loops=1)

  • Sort Key: contragent_supplier.name, contragent_supplier.id
  • Sort Method: top-N heapsort Memory: 303kB
  • Buffers: shared hit=95852
3. 390.298 4,195.965 ↓ 1.0 267,558 1

Hash Join (cost=113,708.12..167,894.29 rows=267,174 width=1,131) (actual time=2,840.602..4,195.965 rows=267,558 loops=1)

  • Buffers: shared hit=95852
4. 99.276 3,144.622 ↓ 1.0 267,558 1

Hash Join (cost=88,645.72..139,158.51 rows=267,174 width=824) (actual time=2,076.066..3,144.622 rows=267,558 loops=1)

  • Buffers: shared hit=82697
5. 138.520 2,290.109 ↓ 1.0 267,558 1

Hash Join (cost=63,583.31..112,945.75 rows=267,174 width=581) (actual time=1,310.889..2,290.109 rows=267,558 loops=1)

  • Buffers: shared hit=69542
6. 633.676 1,408.002 ↓ 1.0 267,558 1

Hash Join (cost=46,230.42..94,248.43 rows=267,174 width=402) (actual time=564.116..1,408.002 rows=267,558 loops=1)

  • Buffers: shared hit=60921
7. 211.657 211.657 ↑ 1.0 1,140,723 1

Seq Scan on contragent_corporation contragent_corporation (cost=0..41,410.85 rows=1,140,785 width=239) (actual time=0.02..211.657 rows=1,140,723 loops=1)

  • Buffers: shared hit=30003
8. 250.354 562.669 ↓ 1.0 267,558 1

Hash (cost=42,890.75..42,890.75 rows=267,174 width=163) (actual time=562.669..562.669 rows=267,558 loops=1)

  • Buffers: shared hit=30918
9. 269.319 312.315 ↓ 1.0 267,558 1

Bitmap Heap Scan on contragent_supplier contragent_supplier (cost=7,107.83..42,890.75 rows=267,174 width=163) (actual time=51.161..312.315 rows=267,558 loops=1)

  • Filter: ((contragent_supplier."end" >= '2019-08-05'::date) OR (contragent_supplier."end" IS NULL))
  • Heap Blocks: exact=29597
  • Buffers: shared hit=30918
10. 42.996 42.996 ↓ 1.0 267,558 1

Bitmap Index Scan on contragent_supplier_ent_id_6b220edd5d346340 (cost=0..7,041.04 rows=267,261 width=0) (actual time=42.996..42.996 rows=267,558 loops=1)

  • Index Cond: ((contragent_supplier.ent_id IS NULL) AND (contragent_supplier.begin <= '2019-08-05'::date))
  • Buffers: shared hit=1321
11. 471.705 743.587 ↓ 1.0 388,102 1

Hash (cost=12,501.84..12,501.84 rows=388,084 width=179) (actual time=743.587..743.587 rows=388,102 loops=1)

  • Buffers: shared hit=8621
12. 271.882 271.882 ↓ 1.0 388,102 1

Seq Scan on contragent_person contragent_person (cost=0..12,501.84 rows=388,084 width=179) (actual time=0.033..271.882 rows=388,102 loops=1)

  • Buffers: shared hit=8621
13. 501.695 755.237 ↓ 1.0 529,224 1

Hash (cost=18,447.18..18,447.18 rows=529,218 width=243) (actual time=755.237..755.237 rows=529,224 loops=1)

  • Buffers: shared hit=13155
14. 253.542 253.542 ↓ 1.0 529,224 1

Seq Scan on contragent_address contragent_address (cost=0..18,447.18 rows=529,218 width=243) (actual time=0.053..253.542 rows=529,224 loops=1)

  • Buffers: shared hit=13155
15. 443.715 661.045 ↓ 1.0 529,224 1

Hash (cost=18,447.18..18,447.18 rows=529,218 width=243) (actual time=661.045..661.045 rows=529,224 loops=1)

  • Buffers: shared hit=13155
16. 217.330 217.330 ↓ 1.0 529,224 1

Seq Scan on contragent_address t5 (cost=0..18,447.18 rows=529,218 width=243) (actual time=0.04..217.33 rows=529,224 loops=1)

  • Buffers: shared hit=13155
Planning time : 1.833 ms
Execution time : 4,481.511 ms