explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0qwQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.027 206,966.995 ↓ 1.7 200 1

Limit (cost=6,696,865.42..6,696,865.72 rows=120 width=2,135) (actual time=206,966.930..206,966.995 rows=200 loops=1)

2. 37.516 206,966.968 ↓ 1.7 200 1

Sort (cost=6,696,865.42..6,696,865.72 rows=120 width=2,135) (actual time=206,966.928..206,966.968 rows=200 loops=1)

  • Sort Key: offredepri0_2_.datecreationsysteme DESC
  • Sort Method: top-N heapsort Memory: 228kB
3. 78.342 206,929.452 ↓ 47.6 5,716 1

Nested Loop (cost=1.12..6,696,861.27 rows=120 width=2,135) (actual time=347.532..206,929.452 rows=5,716 loops=1)

  • Join Filter: ((offredepri0_1_.id)::text = (offredepri0_.id)::text)
4. 82.552 1,088.214 ↓ 28.4 56,872 1

Nested Loop (cost=0.83..33,411.65 rows=2,001 width=1,793) (actual time=0.037..1,088.214 rows=56,872 loops=1)

5. 55.776 369.114 ↓ 28.6 57,868 1

Nested Loop (cost=0.41..31,471.68 rows=2,024 width=1,230) (actual time=0.024..369.114 rows=57,868 loops=1)

6. 23.958 23.958 ↓ 1.0 57,876 1

Seq Scan on dm2_documentcommercialvente offredepri0_1_ (cost=0.00..2,281.31 rows=57,831 width=1,230) (actual time=0.002..23.958 rows=57,876 loops=1)

7. 289.380 289.380 ↑ 1.0 1 57,876

Index Scan using dm1_adresse_pkey on dm1_adresse adresseent1_ (cost=0.41..0.49 rows=1 width=32) (actual time=0.004..0.005 rows=1 loops=57,876)

  • Index Cond: ((id)::text = (offredepri0_1_.id_adresseemetteur)::text)
  • Filter: ((id_etablissement)::text = ANY ('{1,4028817648856aac0148897c4a9a4c86,4028817648856aac0148897c4a9b4c89,4028817648856aac0148897c4a9c4c8f,4028817648856aac0148897c4a9c4c8d,4028817648856aac0148897c4a9c4c8b}'::text[]))
8. 636.548 636.548 ↑ 1.0 1 57,868

Index Scan using dm1_documentcommercial_pkey on dm1_documentcommercial offredepri0_2_ (cost=0.42..0.95 rows=1 width=563) (actual time=0.011..0.011 rows=1 loops=57,868)

  • Index Cond: ((id)::text = (offredepri0_1_.id)::text)
  • Filter: ((datefinvalidite IS NULL) AND (NOT categoriesav))
  • Rows Removed by Filter: 0
9. 216.198 205,762.896 ↓ 0.0 0 56,872

Index Scan using dm2_offredeprixvente_pkey on dm2_offredeprixvente offredepri0_ (cost=0.29..3,330.05 rows=1 width=408) (actual time=3.618..3.618 rows=0 loops=56,872)

  • Index Cond: ((id)::text = (offredepri0_2_.id)::text)
  • Filter: (statutrevue AND ((id)::text !~~ 'DefaultRecord_%'::text) AND ((etat)::text <> '0'::text) AND ((natureoffre)::text = '0'::text) AND ((SubPlan 1) <= 0))
  • Rows Removed by Filter: 0
10.          

SubPlan (forIndex Scan)

11. 71.694 205,546.698 ↑ 1.0 1 10,242

Aggregate (cost=3,329.71..3,329.72 rows=1 width=33) (actual time=20.068..20.069 rows=1 loops=10,242)

12. 169.238 205,475.004 ↑ 1.5 15 10,242

Nested Loop (cost=2,901.54..3,329.66 rows=23 width=33) (actual time=19.696..20.062 rows=15 loops=10,242)

  • Join Filter: ((ligneoffre2_.id)::text = (ligneoffre2_2_.id)::text)
13. 117.930 203,744.106 ↑ 3.4 15 10,242

Nested Loop (cost=2,900.99..3,288.57 rows=51 width=65) (actual time=19.674..19.893 rows=15 loops=10,242)

14. 2,324.934 202,689.180 ↑ 3.4 15 10,242

Bitmap Heap Scan on dm2_ligneoffredeprixvente ligneoffre2_ (cost=2,900.43..3,076.74 rows=51 width=33) (actual time=19.645..19.790 rows=15 loops=10,242)

  • Recheck Cond: (((id_offredeprixvente)::text = (offredepri0_.id)::text) AND ((etatligneoffre)::text = '4'::text))
  • Heap Blocks: exact=23525
15. 574.311 200,364.246 ↓ 0.0 0 10,242

BitmapAnd (cost=2,900.43..2,900.43 rows=51 width=0) (actual time=19.563..19.563 rows=0 loops=10,242)

16. 1,310.976 1,310.976 ↑ 3.6 394 10,242

Bitmap Index Scan on x_dm2_ligneoffredeprixvente_00 (cost=0.00..53.13 rows=1,410 width=0) (actual time=0.128..0.128 rows=394 loops=10,242)

  • Index Cond: ((id_offredeprixvente)::text = (offredepri0_.id)::text)
17. 198,478.959 198,478.959 ↓ 1.0 156,166 10,203

Bitmap Index Scan on ix_45d170369e1ef03ac44bbb4af5480a38 (cost=0.00..2,847.02 rows=151,345 width=0) (actual time=19.453..19.453 rows=156,166 loops=10,203)

  • Index Cond: ((etatligneoffre)::text = '4'::text)
18. 936.996 936.996 ↑ 1.0 1 156,166

Index Only Scan using dm2_lignedocumentcommercialvente_pkey on dm2_lignedocumentcommercialvente ligneoffre2_1_ (cost=0.56..4.14 rows=1 width=32) (actual time=0.006..0.006 rows=1 loops=156,166)

  • Index Cond: (id = (ligneoffre2_.id)::text)
  • Heap Fetches: 601
19. 1,561.660 1,561.660 ↑ 1.0 1 156,166

Index Scan using dm1_lignedocumentcommercial_pkey on dm1_lignedocumentcommercial ligneoffre2_2_ (cost=0.56..0.79 rows=1 width=33) (actual time=0.010..0.010 rows=1 loops=156,166)

  • Index Cond: ((id)::text = (ligneoffre2_1_.id)::text)
  • Filter: (datefinvalidite IS NULL)