explain.depesz.com

PostgreSQL's explain analyze made readable

Result: q6dT

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 156,817.030 ↓ 0.0 0 1

Limit (cost=1.61..1,394.26 rows=300 width=203) (actual time=156,817.030..156,817.030 rows=0 loops=1)

2. 0.000 156,817.028 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.61..15,329,230.18 rows=3,302,168 width=203) (actual time=156,817.028..156,817.028 rows=0 loops=1)

3. 60,352.194 156,817.028 ↓ 0.0 0 1

Nested Loop (cost=1.46..14,792,909.38 rows=3,302,168 width=195) (actual time=156,817.028..156,817.028 rows=0 loops=1)

  • Join Filter: ("LogEvent_1"."tagHeader" = "*VALUES*".column1)
  • Rows Removed by Join Filter: 941888042
4. 3,232.586 67,334.276 ↓ 1.4 9,710,186 1

Nested Loop Left Join (cost=1.46..4,886,403.66 rows=6,808,594 width=195) (actual time=14.798..67,334.276 rows=9,710,186 loops=1)

  • Filter: (("TagHeader".rowid IS NULL) OR "TagHeader".active)
5. 1,254.725 25,260.946 ↑ 1.0 9,710,186 1

Merge Append (cost=1.04..468,817.67 rows=9,712,688 width=159) (actual time=14.783..25,260.946 rows=9,710,186 loops=1)

  • Sort Key: "LogEvent_1".rowid DESC
6. 815.673 815.673 ↑ 1.0 46,222 1

Index Scan Backward using "LogEvent_1_pkey" on "LogEvent_1" (cost=0.29..2,806.71 rows=46,222 width=179) (actual time=0.078..815.673 rows=46,222 loops=1)

  • Filter: ("time" >= '1561939200000'::bigint)
7. 446.432 446.432 ↑ 1.0 49,780 1

Index Scan Backward using "LogEvent_2_pkey" on "LogEvent_2" (cost=0.29..2,234.42 rows=49,780 width=177) (actual time=6.603..446.432 rows=49,780 loops=1)

  • Filter: ("time" >= '1561939200000'::bigint)
8. 22,744.116 22,744.116 ↑ 1.0 9,614,184 1

Index Scan Backward using "LogEvent_3_pkey" on "LogEvent_3" (cost=0.44..338,241.84 rows=9,616,686 width=159) (actual time=8.099..22,744.116 rows=9,614,184 loops=1)

  • Filter: ("time" >= '1561939200000'::bigint)
9. 38,840.744 38,840.744 ↑ 1.0 1 9,710,186

Index Scan using "TagHeader_pkey" on "TagHeader" (cost=0.42..0.44 rows=1 width=9) (actual time=0.004..0.004 rows=1 loops=9,710,186)

  • Index Cond: ("LogEvent_1"."tagHeader" = rowid)
10. 29,130.536 29,130.558 ↑ 1.0 97 9,710,186

Materialize (cost=0.00..1.70 rows=97 width=4) (actual time=0.000..0.003 rows=97 loops=9,710,186)

11. 0.022 0.022 ↑ 1.0 97 1

Values Scan on "*VALUES*" (cost=0.00..1.21 rows=97 width=4) (actual time=0.002..0.022 rows=97 loops=1)

12. 0.000 0.000 ↓ 0.0 0

Index Scan using "LogEventClass_pkey" on "LogEventClass" (cost=0.14..0.16 rows=1 width=16) (never executed)

  • Index Cond: ("LogEvent_1"."eventClass" = rowid)
Planning time : 537.351 ms