explain.depesz.com

PostgreSQL's explain analyze made readable

Result: s9eK

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 61,496.782 ↑ 1.0 100 1

Limit (cost=16,993,219.92..16,993,220.17 rows=100 width=895) (actual time=61,496.755..61,496.782 rows=100 loops=1)

2. 7.842 61,496.766 ↑ 5.7 100 1

Sort (cost=16,993,219.92..16,993,221.34 rows=568 width=895) (actual time=61,496.754..61,496.766 rows=100 loops=1)

  • Sort Key: ordrefabri0_.datecreationsysteme
  • Sort Method: top-N heapsort Memory: 76kB
3. 4.785 61,488.924 ↓ 2.3 1,287 1

Nested Loop Left Join (cost=0.00..16,993,198.22 rows=568 width=895) (actual time=58.136..61,488.924 rows=1,287 loops=1)

4. 3.693 61,480.278 ↓ 2.3 1,287 1

Nested Loop Left Join (cost=0.00..16,993,039.86 rows=568 width=862) (actual time=58.125..61,480.278 rows=1,287 loops=1)

5. 4.076 61,467.576 ↓ 2.3 1,287 1

Nested Loop Left Join (cost=0.00..16,992,845.58 rows=568 width=829) (actual time=58.087..61,467.576 rows=1,287 loops=1)

6. 7.154 61,455.778 ↓ 2.3 1,287 1

Nested Loop (cost=0.00..16,992,640.75 rows=568 width=763) (actual time=58.054..61,455.778 rows=1,287 loops=1)

7. 6.262 61,429.892 ↓ 2.2 1,338 1

Nested Loop (cost=0.00..16,992,414.33 rows=622 width=763) (actual time=58.027..61,429.892 rows=1,338 loops=1)

8. 6.625 6.625 ↑ 1.0 1,455 1

Index Scan using "863_4705" on dm3_gammenomenclature gammenomen2_ (cost=0.00..468.81 rows=1,455 width=32) (actual time=0.046..6.625 rows=1,455 loops=1)

  • Index Cond: (id_affaire IS NOT NULL)
9. 31.889 61,417.005 ↑ 1.0 1 1,455

Index Scan using "516_3793" on dm5_ordrefabrication ordrefabri0_ (cost=0.00..11,678.30 rows=1 width=763) (actual time=42.210..42.211 rows=1 loops=1,455)

  • Index Cond: ((id_gammenomenclature)::text = (gammenomen2_.id)::text)
  • Filter: ((datefinvalidite IS NULL) AND (id_affaire IS NOT NULL) AND ((id)::text !~~ 'DefaultRecord_%'::text) AND (0 < (SubPlan 1)))
  • Rows Removed by Filter: 0
10.          

SubPlan (for Index Scan)

11. 9.373 61,385.116 ↑ 1.0 1 1,339

Aggregate (cost=5,836.81..5,836.82 rows=1 width=32) (actual time=45.844..45.844 rows=1 loops=1,339)

12. 23.953 61,375.743 ↓ 1.9 13 1,339

Nested Loop (cost=0.00..5,836.79 rows=7 width=32) (actual time=15.208..45.837 rows=13 loops=1,339)

13. 13.390 61,265.945 ↓ 1.9 13 1,339

Nested Loop (cost=0.00..5,802.15 rows=7 width=65) (actual time=15.181..45.755 rows=13 loops=1,339)

14. 17.407 17.407 ↑ 1.0 1 1,339

Index Only Scan using "516_1174" on dm5_ordrefabrication ordrefabri3_ (cost=0.00..4.28 rows=1 width=32) (actual time=0.010..0.013 rows=1 loops=1,339)

  • Index Cond: (id = (ordrefabri0_.id)::text)
  • Heap Fetches: 123
15. 61,235.148 61,235.148 ↓ 1.9 13 1,339

Seq Scan on dm5_operationordrefabrication listeopera4_ (cost=0.00..5,797.80 rows=7 width=65) (actual time=15.165..45.732 rows=13 loops=1,339)

  • Filter: ((id_ordrefabrication)::text = (ordrefabri0_.id)::text)
  • Rows Removed by Filter: 120383
16. 85.845 85.845 ↑ 1.0 1 17,169

Index Only Scan using "779_1948" on dm1_operation listeopera4_1_ (cost=0.00..4.94 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=17,169)

  • Index Cond: (id = (listeopera4_.id)::text)
  • Heap Fetches: 1882
17. 18.732 18.732 ↑ 1.0 1 1,338

Index Scan using "759_1897" on dm6_affaire affaireent1_ (cost=0.00..0.35 rows=1 width=32) (actual time=0.013..0.014 rows=1 loops=1,338)

  • Index Cond: ((id)::text = (ordrefabri0_.id_affaire)::text)
  • Filter: ((etataffaire)::text <> '2'::text)
  • Rows Removed by Filter: 0
18. 7.722 7.722 ↓ 0.0 0 1,287

Index Scan using "350_685" on dm5_ordrefabricationcommande ordrefabri0_1_ (cost=0.00..0.35 rows=1 width=66) (actual time=0.006..0.006 rows=0 loops=1,287)

  • Index Cond: ((ordrefabri0_.id)::text = (id)::text)
19. 9.009 9.009 ↑ 1.0 1 1,287

Index Only Scan using "351_687" on dm5_ordrefabricationmanuel ordrefabri0_2_ (cost=0.00..0.33 rows=1 width=33) (actual time=0.007..0.007 rows=1 loops=1,287)

  • Index Cond: (id = (ordrefabri0_.id)::text)
  • Heap Fetches: 10
20. 3.861 3.861 ↓ 0.0 0 1,287

Index Only Scan using "349_683" on dm5_ordrefabricationcbn ordrefabri0_3_ (cost=0.00..0.27 rows=1 width=33) (actual time=0.003..0.003 rows=0 loops=1,287)

  • Index Cond: (id = (ordrefabri0_.id)::text)
  • Heap Fetches: 0
Total runtime : 61,497.050 ms