explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EFfH

Settings
# exclusive inclusive rows x rows loops node
1. 0.006 575.652 ↑ 1.0 20 1

Limit (cost=842,254.92..877,385.69 rows=20 width=60) (actual time=573.849..575.652 rows=20 loops=1)

2. 2.225 575.646 ↑ 23.2 20 1

Result (cost=842,254.92..1,657,288.62 rows=464 width=60) (actual time=573.848..575.646 rows=20 loops=1)

3. 0.411 573.421 ↑ 23.2 20 1

Sort (cost=842,254.92..842,256.08 rows=464 width=32) (actual time=573.417..573.421 rows=20 loops=1)

  • Sort Key: ((SubPlan 1)) DESC
  • Sort Method: top-N heapsort Memory: 27kB
4. 308.275 573.010 ↓ 1.0 477 1

Seq Scan on ref_people (cost=0.00..842,242.58 rows=464 width=32) (actual time=0.672..573.010 rows=477 loops=1)

  • Filter: (is_active AND (id_statut <> 2) AND ((code_constellation)::text = 'BET'::text) AND (id_type = 5))
  • Rows Removed by Filter: 326819
5.          

SubPlan (forSeq Scan)

6. 2.385 264.735 ↑ 1.0 1 477

Aggregate (cost=1,756.27..1,756.28 rows=1 width=8) (actual time=0.555..0.555 rows=1 loops=477)

7. 4.434 262.350 ↑ 1.0 1 477

Nested Loop (cost=12.20..1,756.26 rows=1 width=4) (actual time=0.399..0.550 rows=1 loops=477)

8. 219.897 236.592 ↓ 4.0 4 477

Bitmap Heap Scan on ref_mandat (cost=11.78..1,746.01 rows=1 width=8) (actual time=0.328..0.496 rows=4 loops=477)

  • Recheck Cond: (id_int_agent = ref_people.id_int)
  • Filter: (is_active AND ((COALESCE(validation_status, ''::character varying))::text <> ALL ('{invalidation_mandat,annulation_mandat}'::text[])) AND (registered_date >= '2018-07-01 00:00:00+02'::timestamp with time zone) AND (registered_date <= '2019-04-30 00:00:00+02'::timestamp with time zone) AND (id_domain = 1) AND (upper((type)::text) = ANY ('{"SUCCÈS / SEMI EXCLU",EXCLUSIF,SUCCÈS}'::text[])))
  • Rows Removed by Filter: 255
  • Heap Blocks: exact=17159
9. 16.695 16.695 ↑ 1.6 280 477

Bitmap Index Scan on ref_mandat_xperf3 (cost=0.00..11.78 rows=446 width=0) (actual time=0.035..0.035 rows=280 loops=477)

  • Index Cond: (id_int_agent = ref_people.id_int)
10. 21.324 21.324 ↓ 0.0 0 1,777

Index Scan using ref_transaction_xperf9 on ref_transaction (cost=0.42..10.24 rows=1 width=8) (actual time=0.007..0.012 rows=0 loops=1,777)

  • Index Cond: ((id_filiale = ref_mandat.id_filiale) AND (id_mandat = ref_mandat.id_ext))
  • Filter: (is_active AND (date_validation IS NOT NULL) AND (date_compromis IS NOT NULL))
  • Rows Removed by Filter: 1
Planning time : 6.136 ms
Execution time : 575.787 ms