explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DUHj

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 8,669.552 ↑ 1.0 1 1

Limit (cost=598,467.28..696,390.79 rows=1 width=1,495) (actual time=8,526.300..8,669.552 rows=1 loops=1)

  • Buffers: shared hit=142112 read=10612, temp written=58809
2. 0.004 8,669.549 ↑ 1.0 1 1

Nested Loop (cost=598,467.28..696,390.79 rows=1 width=1,495) (actual time=8,526.299..8,669.549 rows=1 loops=1)

  • Buffers: shared hit=142112 read=10612, temp written=58809
3. 145.758 8,669.528 ↑ 1.0 1 1

Hash Join (cost=598,467.28..696,390.51 rows=1 width=1,503) (actual time=8,526.280..8,669.528 rows=1 loops=1)

  • Hash Cond: ((simulation0_.sim_id = simulation1_.set_sim_id) AND ((SubPlan 2) = simulation1_.set_id))
  • Buffers: shared hit=142109 read=10612, temp written=58809
4. 0.164 0.164 ↑ 1.0 1 1

Index Scan using sim_idx01 on t_simulation_sim simulation0_ (cost=0.00..4.28 rows=1 width=1,495) (actual time=0.163..0.164 rows=1 loops=1)

  • Index Cond: (((sim_code)::text = '051_RT237246_1'::text) AND (sim_version = 1::numeric))
  • Buffers: shared hit=1 read=4
5. 4,544.256 8,523.424 ↓ 1.0 14,594,668 1

Hash (cost=297,135.51..297,135.51 rows=14,445,851 width=24) (actual time=8,523.424..8,523.424 rows=14,594,668 loops=1)

  • Buckets: 524288 Batches: 4 Memory Usage: 199378kB
  • Buffers: shared hit=142072 read=10605, temp written=58806
6. 3,979.168 3,979.168 ↓ 1.0 14,594,668 1

Seq Scan on t_simulationeventtrack_set simulation1_ (cost=0.00..297,135.51 rows=14,445,851 width=24) (actual time=0.028..3,979.168 rows=14,594,668 loops=1)

  • Buffers: shared hit=142072 read=10605
7.          

SubPlan (for Hash Join)

8. 0.000 0.182 ↑ 1.0 1 2

Aggregate (cost=1,896.12..1,896.13 rows=1 width=8) (actual time=0.091..0.091 rows=1 loops=2)

  • Buffers: shared hit=34 read=3
9.          

Initplan (for Aggregate)

10. 0.004 0.026 ↑ 1.0 1 2

Aggregate (cost=957.80..957.81 rows=1 width=4) (actual time=0.013..0.013 rows=1 loops=2)

  • Buffers: shared hit=18
11. 0.008 0.022 ↑ 217.2 9 2

Nested Loop (cost=0.00..952.92 rows=1,955 width=4) (actual time=0.005..0.011 rows=9 loops=2)

  • Buffers: shared hit=18
12. 0.004 0.004 ↑ 1.0 1 2

Index Scan using pk_simulation on t_simulation_sim simulation5_ (cost=0.00..4.27 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=2)

  • Index Cond: (sim_id = simulation0_.sim_id)
  • Buffers: shared hit=8
13. 0.010 0.010 ↑ 217.2 9 2

Index Scan using idx_set_sim_id on t_simulationeventtrack_set simulation6_ (cost=0.00..929.09 rows=1,955 width=12) (actual time=0.002..0.005 rows=9 loops=2)

  • Index Cond: (set_sim_id = simulation0_.sim_id)
  • Buffers: shared hit=10
14. 0.008 0.180 ↓ 1.8 7 2

Nested Loop (cost=0.00..938.29 rows=4 width=8) (actual time=0.085..0.090 rows=7 loops=2)

  • Buffers: shared hit=34 read=3
15. 0.100 0.100 ↑ 1.0 1 2

Index Scan using pk_simulation on t_simulation_sim simulation3_ (cost=0.00..4.27 rows=1 width=8) (actual time=0.050..0.050 rows=1 loops=2)

  • Index Cond: (sim_id = simulation0_.sim_id)
  • Buffers: shared hit=7 read=2
16. 0.072 0.072 ↓ 1.8 7 2

Index Scan using idx_set_sim_id on t_simulationeventtrack_set simulation4_ (cost=0.00..933.98 rows=4 width=16) (actual time=0.033..0.036 rows=7 loops=2)

  • Index Cond: (set_sim_id = simulation0_.sim_id)
  • Filter: (set_date = $1)
  • Buffers: shared hit=27 read=1
17. 0.017 0.017 ↑ 1.0 1 1

Index Scan using pk_user on t_user_usr user2_ (cost=0.00..0.27 rows=1 width=8) (actual time=0.017..0.017 rows=1 loops=1)

  • Index Cond: (usr_id = simulation1_.set_usr_id)
  • Buffers: shared hit=3
Total runtime : 8,685.265 ms