Update on album (cost=0.00..111513666.56 rows=0 width=0) (actual time=9249.782..9249.787 rows=0 loops=1) -> Seq Scan on album (cost=0.00..111513666.56 rows=84878 width=22) (actual time=9249.762..9249.766 rows=0 loops=1) " Filter: (((""albumThumbnailAssetId"" IS NULL) AND (SubPlan 2)) OR ((""albumThumbnailAssetId"" IS NOT NULL) AND (NOT (SubPlan 3))))" Rows Removed by Filter: 168847 SubPlan 1 -> Limit (cost=1293.56..1293.56 rows=1 width=24) (never executed) -> Sort (cost=1293.56..1294.63 rows=429 width=24) (never executed) " Sort Key: asset.""fileCreatedAt"" DESC" -> Nested Loop (cost=1.12..1291.41 rows=429 width=24) (never executed) -> Index Only Scan using album_asset_pkey on album_asset (cost=0.56..15.27 rows=429 width=16) (never executed) " Index Cond: (""albumsId"" = album.id)" Heap Fetches: 0 " -> Index Scan using ""asset_id_stackId_idx"" on asset (cost=0.56..2.97 rows=1 width=24) (never executed)" " Index Cond: (id = album_asset.""assetsId"")" " Filter: (""deletedAt"" IS NULL)" SubPlan 2 -> Nested Loop (cost=1.12..1291.41 rows=429 width=0) (actual time=0.125..0.126 rows=0 loops=1) -> Index Only Scan using album_asset_pkey on album_asset album_asset_1 (cost=0.56..15.27 rows=429 width=16) (actual time=0.114..0.114 rows=0 loops=1) " Index Cond: (""albumsId"" = album.id)" Heap Fetches: 0 " -> Index Scan using ""asset_id_stackId_idx"" on asset asset_1 (cost=0.56..2.97 rows=1 width=16) (never executed)" " Index Cond: (id = album_asset_1.""assetsId"")" " Filter: (""deletedAt"" IS NULL)" SubPlan 3 -> Nested Loop (cost=1.12..5.97 rows=1 width=0) (actual time=0.049..0.049 rows=1 loops=168846) " -> Index Scan using ""album_asset_assetsId_idx"" on album_asset album_asset_2 (cost=0.56..2.98 rows=1 width=16) (actual time=0.022..0.022 rows=1 loops=168846)" " Index Cond: (""assetsId"" = album.""albumThumbnailAssetId"")" " Filter: (""albumsId"" = album.id)" Rows Removed by Filter: 0 " -> Index Scan using ""asset_id_stackId_idx"" on asset asset_2 (cost=0.56..2.98 rows=1 width=16) (actual time=0.025..0.025 rows=1 loops=168846)" " Index Cond: (id = album.""albumThumbnailAssetId"")" " Filter: (""deletedAt"" IS NULL)" Planning Time: 27.059 ms JIT: Functions: 41 " Options: Inlining true, Optimization true, Expressions true, Deforming true" " Timing: Generation 35.636 ms, Inlining 308.857 ms, Optimization 292.641 ms, Emission 123.780 ms, Total 760.915 ms" Execution Time: 9404.319 ms