explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9bUA : 2.0

Settings
# exclusive inclusive rows x rows loops node
1. 0.038 739.485 ↓ 7.6 99 1

Hash Join (cost=230,684.57..230,685.06 rows=13 width=53) (actual time=739.415..739.485 rows=99 loops=1)

  • Hash Cond: (mrc.id = ijo.id_organisme)
2.          

CTE mrc

3. 0.024 0.736 ↓ 6.6 99 1

Unique (cost=81.13..81.47 rows=15 width=69) (actual time=0.706..0.736 rows=99 loops=1)

4. 0.069 0.712 ↓ 6.7 100 1

Sort (cost=81.13..81.17 rows=15 width=69) (actual time=0.706..0.712 rows=100 loops=1)

  • Sort Key: o.id, o.identifiant, o.identifiant_alternatif, o.uuid, o.commentaire_population, o.actif, o.date_debut, o.date_fin
  • Sort Method: quicksort Memory: 32kB
5. 0.040 0.643 ↓ 6.7 100 1

Nested Loop (cost=17.94..80.84 rows=15 width=69) (actual time=0.057..0.643 rows=100 loops=1)

6. 0.258 0.503 ↓ 6.7 100 1

Hash Join (cost=17.66..75.26 rows=15 width=4) (actual time=0.045..0.503 rows=100 loops=1)

  • Hash Cond: (oto.id_type_organisme = t.id)
7. 0.229 0.229 ↓ 1.0 3,026 1

Seq Scan on organisme_type_organisme oto (cost=0.00..49.74 rows=2,974 width=8) (actual time=0.009..0.229 rows=3,026 loops=1)

8. 0.006 0.016 ↑ 3.0 1 1

Hash (cost=17.62..17.62 rows=3 width=4) (actual time=0.016..0.016 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
9. 0.010 0.010 ↑ 3.0 1 1

Seq Scan on type_organisme t (cost=0.00..17.62 rows=3 width=4) (actual time=0.008..0.010 rows=1 loops=1)

  • Filter: (code = '35'::text)
  • Rows Removed by Filter: 47
10. 0.100 0.100 ↑ 1.0 1 100

Index Scan using organisme_pkey on organisme o (cost=0.28..0.37 rows=1 width=69) (actual time=0.001..0.001 rows=1 loops=100)

  • Index Cond: (id = oto.id_organisme)
11. 0.753 0.753 ↓ 6.6 99 1

CTE Scan on mrc (cost=0.00..0.30 rows=15 width=37) (actual time=0.708..0.753 rows=99 loops=1)

12. 0.440 738.694 ↓ 204.8 2,662 1

Hash (cost=230,602.94..230,602.94 rows=13 width=20) (actual time=738.694..738.694 rows=2,662 loops=1)

  • Buckets: 4,096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 167kB
13. 0.227 738.254 ↓ 204.8 2,662 1

Subquery Scan on ijo (cost=230,602.72..230,602.94 rows=13 width=20) (actual time=737.446..738.254 rows=2,662 loops=1)

14. 0.465 738.027 ↓ 204.8 2,662 1

Group (cost=230,602.72..230,602.81 rows=13 width=20) (actual time=737.446..738.027 rows=2,662 loops=1)

  • Group Key: ijo_1.id_organisme, ijo_1.nom_officiel
15. 1.605 737.562 ↓ 204.8 2,662 1

Sort (cost=230,602.72..230,602.75 rows=13 width=20) (actual time=737.444..737.562 rows=2,662 loops=1)

  • Sort Key: ijo_1.id_organisme, ijo_1.nom_officiel
  • Sort Method: quicksort Memory: 268kB
16. 1.432 735.957 ↓ 204.8 2,662 1

Seq Scan on information_juridique_organisme ijo_1 (cost=0.00..230,602.48 rows=13 width=20) (actual time=0.334..735.957 rows=2,662 loops=1)

  • Filter: (date_debut = (SubPlan 2))
  • Rows Removed by Filter: 9
17.          

SubPlan (for Seq Scan)

18. 5.342 734.525 ↑ 1.0 1 2,671

GroupAggregate (cost=0.00..86.60 rows=1 width=8) (actual time=0.275..0.275 rows=1 loops=2,671)

  • Group Key: information_juridique_organisme.id_organisme
19. 729.183 729.183 ↑ 1.0 1 2,671

Seq Scan on information_juridique_organisme (cost=0.00..86.59 rows=1 width=8) (actual time=0.138..0.273 rows=1 loops=2,671)

  • Filter: ((id_organisme = ijo_1.id_organisme) AND (date_debut <= now()))
  • Rows Removed by Filter: 2,670
Planning time : 0.482 ms
Execution time : 739.578 ms