explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tnWG : SQL 2: (SO: http://stackoverflow.com/q/29555116/1082673)

Settings
# exclusive inclusive rows x rows loops node
1. 179.440 827.090 ↓ 22,241.0 22,241 1

Aggregate (cost=40409.15..40409.16 rows=1 width=13) (actual time=1041.763..1041.764 rows=1 loops=1)-> Hash Anti Join (cost=33,884.47..40,409.15 rows=1 width=13) (actual time=629.690..827.090 rows=22,241 loops=1)

  • Hash Cond: ((l1.mobile_number)::text = (l2.mobile_number)::text)
2. 18.895 18.895 ↑ 1.0 30,447 1

Index Scan using log_entries_created_at_idx on log_entries l1 (cost=0.42..1,626.37 rows=31,047 width=13) (actual time=0.027..18.895 rows=30,447 loops=1)

  • Index Cond: ((created_at >= '2015-04-09 00:00:00'::timestamp without time zone) AND (created_at <= '2015-04-09 23:59:59'::timestamp without time zone))
3. 287.632 628.755 ↓ 1.0 641,412 1

Hash (cost=22,778.29..22,778.29 rows=638,861 width=13) (actual time=628.755..628.755 rows=641,412 loops=1)

  • Buckets: 4096 Batches: 32 Memory Usage: 954kB
4. 341.123 341.123 ↓ 1.0 641,412 1

Seq Scan on log_entries l2 (cost=0.00..22,778.29 rows=638,861 width=13) (actual time=0.784..341.123 rows=641,412 loops=1)

  • Filter: (created_at < '2015-04-09 00:00:00'::timestamp without time zone)
  • Rows Removed by Filter: 34691
Total runtime : 1,042.070 ms