explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Xged

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 1,586.989 ↑ 1.0 1 1

Limit (cost=143,537.67..165,870.30 rows=1 width=62) (actual time=1,586.989..1,586.989 rows=1 loops=1)

2. 0.002 1,586.988 ↑ 200.0 1 1

Unique (cost=143,537.67..4,610,062.32 rows=200 width=62) (actual time=1,586.988..1,586.988 rows=1 loops=1)

3. 0.007 1,586.986 ↑ 932,933.0 1 1

Nested Loop (cost=143,537.67..4,607,729.99 rows=932,933 width=62) (actual time=1,586.986..1,586.986 rows=1 loops=1)

4. 0.002 1,586.938 ↑ 932,933.0 1 1

Merge Append (cost=143,537.25..157,539.26 rows=932,933 width=58) (actual time=1,586.938..1,586.938 rows=1 loops=1)

  • Sort Key: vhistory.export_id, vhistory.actiontime
5. 0.002 0.002 ↓ 0.0 0 1

Index Scan using videoexporthistory_v2_export_id_actiontime_ix on videoexporthistory_v2 vhistory (cost=0.13..8.14 rows=1 width=88) (actual time=0.002..0.002 rows=0 loops=1)

6. 1,217.506 1,586.934 ↑ 932,932.0 1 1

Sort (cost=143,537.12..145,869.45 rows=932,932 width=58) (actual time=1,586.934..1,586.934 rows=1 loops=1)

  • Sort Key: vhistory_1.export_id, vhistory_1.actiontime
  • Sort Method: quicksort Memory: 155765kB
7. 369.428 369.428 ↑ 1.0 932,932 1

Seq Scan on videoexporthistory_v2_0 vhistory_1 (cost=0.00..51,030.32 rows=932,932 width=58) (actual time=0.005..369.428 rows=932,932 loops=1)

8. 0.001 0.041 ↑ 1.0 1 1

Limit (cost=0.42..4.75 rows=1 width=12) (actual time=0.041..0.041 rows=1 loops=1)

9. 0.005 0.040 ↑ 100.0 1 1

Merge Append (cost=0.42..433.18 rows=100 width=12) (actual time=0.040..0.040 rows=1 loops=1)

  • Sort Key: useractionhistory_v2.actiontime
10. 0.009 0.009 ↓ 0.0 0 1

Index Scan using useractionhistory_v2_actiontime_ix on useractionhistory_v2 (cost=0.13..8.15 rows=1 width=12) (actual time=0.009..0.009 rows=0 loops=1)

  • Index Cond: ((action = 0) AND (actiontime <= vhistory.actiontime))
  • Filter: (user_id = vhistory.user_id)
11. 0.026 0.026 ↑ 99.0 1 1

Index Scan using useractionhistory_v2_0_actionime_ix on useractionhistory_v2_0 (cost=0.29..423.78 rows=99 width=12) (actual time=0.026..0.026 rows=1 loops=1)

  • Index Cond: (actiontime <= vhistory.actiontime)
  • Filter: ((action = 0) AND (user_id = vhistory.user_id))
  • Rows Removed by Filter: 1
Planning time : 0.727 ms
Execution time : 1,613.559 ms