explain.depesz.com

A tool for finding a real cause for slow queries.

Result: n8P

options
Did it help? Consider supporting us - Bitcoin address: 12v2hUztAk2LgzQ9H9LMwuU32urHMjZQnq
# exclusive inclusive rows x rows loops node
1. 0.009 10,481.394 ↑ 1.0 15 1

Limit (cost=96,934.21..96,935.78 rows=15 width=316) (actual time=10,415.940..10,481.394 rows=15 loops=1)

  • Buffers: shared hit=208673, temp read=534 written=1298
2. 6.465 10,481.385 ↑ 114.4 15 1

GroupAggregate (cost=96,934.21..97,114.39 rows=1,716 width=316) (actual time=10,415.936..10,481.385 rows=15 loops=1)

  • Buffers: shared hit=208673, temp read=534 written=1298
3. 9,261.762 10,474.920 ↓ 1.7 2,975 1

Sort (cost=96,934.21..96,938.50 rows=1,716 width=316) (actual time=10,402.852..10,474.920 rows=2,975 loops=1)

  • Sort Key: e.id_entreprise, e.id_job, e.id_stock_insee, e.id_stock_bodacc, e.siren, e.nic, e.denomination, e.nom, e.nom_usage, e.prenom, e.adresse, e.code_postal, e.commune, e.d
  • Sort Method: external merge Disk: 10376kB
  • Buffers: shared hit=208673, temp read=534 written=1298
4. 38.201 1,213.158 ↓ 24.6 42,232 1

Hash Left Join (cost=56,702.95..96,842.02 rows=1,716 width=316) (actual time=381.467..1,213.158 rows=42,232 loops=1)

  • Hash Cond: (e.id_code_categorie_juridique = cj.id_code_categorie_juridique)
  • Buffers: shared hit=208657
5. 43.985 1,174.332 ↓ 24.6 42,232 1

Hash Left Join (cost=56,691.93..96,812.41 rows=1,716 width=276) (actual time=380.798..1,174.332 rows=42,232 loops=1)

  • Hash Cond: (e.id_code_naf = nc.id_code)
  • Buffers: shared hit=208653
6. 85.610 1,122.233 ↓ 24.6 42,232 1

Nested Loop (cost=56,563.01..96,658.54 rows=1,716 width=229) (actual time=372.619..1,122.233 rows=42,232 loops=1)

  • Buffers: shared hit=208609
7. 328.729 867.695 ↓ 24.6 42,232 1

Hash Join (cost=56,563.01..86,936.80 rows=1,716 width=12) (actual time=372.508..867.695 rows=42,232 loops=1)

  • Hash Cond: (edp.id_entreprise = i.id_entreprise)
  • Buffers: shared hit=39596
8. 166.591 166.591 ↓ 1.0 660,765 1

Seq Scan on entreprise_document_presse edp (cost=0.00..22,282.39 rows=645,939 width=8) (actual time=0.042..166.591 rows=660,765 loops=1)

  • Buffers: shared hit=15823
9. 28.360 372.375 ↑ 1.1 30,267 1

Hash (cost=56,163.96..56,163.96 rows=31,924 width=4) (actual time=372.375..372.375 rows=30,267 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 1065kB
  • Buffers: shared hit=23773
10. 344.015 344.015 ↑ 1.1 30,267 1

Bitmap Heap Scan on index_entreprise_fulltext i (cost=2,141.41..56,163.96 rows=31,924 width=4) (actual time=89.824..344.015 rows=30,267 loops=1)

  • Recheck Cond: (lexemes_denom @@ '''paris'''::tsquery)
  • Buffers: shared hit=23773
  • -> Bitmap Index Scan on idx_index_entreprise_fulltext_lexemes_denom (cost=0.00..2133.43 rows=31924 width=0) (actual time=75.147..75.147 ro
  • Index Cond: (lexemes_denom @@ '''paris'''::tsquery)
  • Buffers: shared hit=969
11. 168.928 168.928 ↑ 1.0 1 42,232

Index Scan using entreprise_pkey on entreprise e (cost=0.00..5.65 rows=1 width=229) (actual time=0.004..0.004 rows=1 loops=42,232)

  • Index Cond: (id_entreprise = i.id_entreprise)
  • Buffers: shared hit=169013
12. 4.806 8.114 ↑ 1.0 3,774 1

Hash (cost=81.74..81.74 rows=3,774 width=51) (actual time=8.114..8.114 rows=3,774 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 315kB
  • Buffers: shared hit=44
13. 3.308 3.308 ↑ 1.0 3,774 1

Seq Scan on code nc (cost=0.00..81.74 rows=3,774 width=51) (actual time=0.040..3.308 rows=3,774 loops=1)

  • Buffers: shared hit=44
14. 0.357 0.625 ↑ 1.0 312 1

Hash (cost=7.12..7.12 rows=312 width=42) (actual time=0.625..0.625 rows=312 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 23kB
  • Buffers: shared hit=4
15. 0.268 0.268 ↑ 1.0 312 1

Seq Scan on code_categorie_juridique cj (cost=0.00..7.12 rows=312 width=42) (actual time=0.023..0.268 rows=312 loops=1)

  • Buffers: shared hit=4