explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 59kR

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 24,488.752 ↓ 0.0 0 1

Update on "epg_series_api" (cost=862,724.88..937,359.08 rows=5,818 width=779) (actual time=24,488.752..24,488.752 rows=0 loops=1)

2. 0.252 24,488.750 ↓ 0.0 0 1

Hash Join (cost=862,724.88..937,359.08 rows=5,818 width=779) (actual time=24,488.750..24,488.750 rows=0 loops=1)

  • Hash Cond: ("s"."series_id" = "epg_series_api"."series_id")
3. 0.001 24,451.226 ↓ 0.0 0 1

Subquery Scan on s (cost=859,709.81..934,234.93 rows=5,818 width=104) (actual time=24,451.226..24,451.226 rows=0 loops=1)

4. 0.002 24,451.225 ↓ 0.0 0 1

GroupAggregate (cost=859,709.81..934,176.75 rows=5,818 width=40) (actual time=24,451.225..24,451.225 rows=0 loops=1)

  • Group Key: "sub"."series_id
5. 0.001 24,451.223 ↓ 0.0 0 1

Subquery Scan on sub (cost=859,709.81..933,980.24 rows=7,073 width=175) (actual time=24,451.222..24,451.223 rows=0 loops=1)

  • Filter: ("sub"."image_rank" = 1)
6. 0.002 24,451.222 ↓ 0.0 0 1

WindowAgg (cost=859,709.81..916,296.81 rows=1,414,675 width=227) (actual time=24,451.222..24,451.222 rows=0 loops=1)

7. 0.057 24,451.220 ↓ 0.0 0 1

Sort (cost=859,709.81..863,246.49 rows=1,414,675 width=219) (actual time=24,451.220..24,451.220 rows=0 loops=1)

  • Sort Key: "pi"."series_id", "pi"."image_type_id", ("round"((("if"."file_width")::numeric / ("if"."file_height")::numeric), 2)), (("if"."file_width" * "if"."file_height")) DESC, "if"."image_id
  • Sort Method: quicksort Memory: 25kB
8. 2.191 24,451.163 ↓ 0.0 0 1

Hash Join (cost=553,259.37..629,530.33 rows=1,414,675 width=219) (actual time=24,451.163..24,451.163 rows=0 loops=1)

  • Hash Cond: ("pi"."image_id" = "if"."image_id")
9. 0.013 0.047 ↑ 682,332.0 1 1

Hash Join (cost=2.15..26,094.53 rows=682,332 width=39) (actual time=0.047..0.047 rows=1 loops=1)

  • Hash Cond: ("pi"."image_type_id" = "it"."image_type_id")
10. 0.011 0.011 ↑ 682,332.0 1 1

Seq Scan on "rovi_programimages" "pi" (cost=0.00..16,710.32 rows=682,332 width=24) (actual time=0.011..0.011 rows=1 loops=1)

11. 0.013 0.023 ↑ 1.0 51 1

Hash (cost=1.51..1.51 rows=51 width=23) (actual time=0.023..0.023 rows=51 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
12. 0.010 0.010 ↑ 1.0 51 1

Seq Scan on "rovi_image_types" "it" (cost=0.00..1.51 rows=51 width=23) (actual time=0.005..0.010 rows=51 loops=1)

13. 0.001 24,448.925 ↓ 0.0 0 1

Hash (cost=521,554.54..521,554.54 rows=932,854 width=152) (actual time=24,448.925..24,448.925 rows=0 loops=1)

  • Buckets: 524288 Batches: 4 Memory Usage: 4148kB
14. 24,448.924 24,448.924 ↓ 0.0 0 1

Index Scan using "rovi_imagefiles_image_id_file_format_id_idx" on "rovi_imagefiles" "if" (cost=0.56..521,554.54 rows=932,854 width=152) (actual time=24,448.924..24,448.924 rows=0 loops=1)

  • Index Cond: ("file_format_id" = 0)
  • Filter: (("file_type")::"text" = ANY ('{jpg,jpeg,png}'::"text"[]))
15. 22.860 37.272 ↑ 1.0 58,892 1

Hash (cost=2,278.92..2,278.92 rows=58,892 width=683) (actual time=37.272..37.272 rows=58,892 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 13768kB
16. 14.412 14.412 ↑ 1.0 58,892 1

Seq Scan on "epg_series_api" (cost=0.00..2,278.92 rows=58,892 width=683) (actual time=0.015..14.412 rows=58,892 loops=1)