Timing is on.
Expanded display is used automatically.
=========================================
Jellyfin Slow Query Analysis
Generated: 2026-03-05
=========================================

1. CHECKING pg_stat_statements EXTENSION
-----------------------------------------
               status               
------------------------------------
 Γ£à pg_stat_statements is installed
(1 row)

Time: 6.388 ms

2. TOP 20 SLOWEST QUERIES (by max execution time)
-----------------------------------------
These are the queries that have taken the longest time to execute

                                            query_preview                                             | calls  |  avg_ms  |  max_ms   |  min_ms  | stddev_ms |  total_ms  | pct_total | rows_returned 
------------------------------------------------------------------------------------------------------+--------+----------+-----------+----------+-----------+------------+-----------+---------------
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |     48 |  4442.75 | 110048.00 |     0.06 |  16402.46 |  213251.89 |      0.95 |        686245
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanNa |     76 |  3229.72 |  36337.21 |     4.97 |   9092.39 |  245458.47 |      1.10 |        102270
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |     52 |  7866.05 |  26096.65 |  5006.51 |   3805.70 |  409034.56 |      1.83 |         36574
 UPDATE library."UserData" SET "AudioStreamIndex" = $1, "IsFavorite" = $2, "LastPlayedDate" = $3, "Li |  14316 |   106.91 |  23851.53 |     0.03 |    988.30 | 1530501.42 |      6.83 |         14316
 vacuum analyze                                                                                       |      1 | 21774.01 |  21774.01 | 21774.01 |      0.00 |   21774.01 |      0.10 |             0
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |     53 |  5986.96 |  12890.72 |  5072.22 |   1216.46 |  317308.89 |      1.42 |         16617
 SELECT p."Id", p."Name", p."PersonType"                                                             +| 211825 |     1.16 |  12094.95 |     0.02 |     43.95 |  246756.24 |      1.10 |       1773814
 FROM library."Peoples" AS p                                                                         +|        |          |           |          |           |            |           | 
 WHERE EXISTS (                                                                                      +|        |          |           |          |           |            |           | 
     SELECT $3                                                                                       +|        |          |           |          |           |            |           | 
                                                                                                      |        |          |           |          |           |            |           | 
 UPDATE library."BaseItems" SET "Album" = $1, "AlbumArtists" = $2, "Artists" = $3, "Audio" = $4, "Cha | 406513 |     1.02 |   9426.48 |     0.05 |     27.96 |  412669.19 |      1.84 |        406513
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |     10 |  2206.52 |   9421.86 |   251.47 |   2733.73 |   22065.22 |      0.10 |            42
 VACUUM ANALYZE "library"."BaseItems"                                                                 |      4 |  5244.50 |   9270.56 |  3148.60 |   2369.95 |   20978.00 |      0.09 |             0
 COPY library."BaseItems" ("Id", "Type", "Data", "Path", "StartDate", "EndDate", "ChannelId", "IsMovi |      9 |  4020.63 |   9063.50 |  2538.74 |   1866.14 |   36185.64 |      0.16 |       1108542
 INSERT INTO library."MediaStreamInfos" ("ItemId", "StreamIndex", "AspectRatio", "AverageFrameRate",  | 101306 |     0.93 |   8773.59 |     0.07 |     31.87 |   94103.95 |      0.42 |        101306
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanNa |  79571 |     9.21 |   7635.50 |     0.04 |     48.78 |  732567.21 |      3.27 |      10190469
 SELECT b5."Id", b5."Album", b5."AlbumArtists", b5."Artists", b5."Audio", b5."ChannelId", b5."CleanNa |     33 |   740.05 |   7215.29 |     0.18 |   1789.11 |   24421.52 |      0.11 |           291
 ANALYZE library."BaseItems"                                                                          |      2 |  3598.85 |   7191.23 |     6.46 |   3592.39 |    7197.69 |      0.03 |             0
 ANALYZE VERBOSE                                                                                      |      1 |  7016.06 |   7016.06 |  7016.06 |      0.00 |    7016.06 |      0.03 |             0
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanNa |     53 |   323.45 |   6859.71 |     4.87 |   1141.58 |   17142.89 |      0.08 |         21813
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |      5 |  5713.88 |   6550.26 |  5236.67 |    445.80 |   28569.39 |      0.13 |          7069
 SELECT count(*)::int                                                                                +|     45 |  1026.64 |   6541.00 |   194.07 |   1139.27 |   46198.75 |      0.21 |            45
 FROM library."BaseItems" AS b                                                                       +|        |          |           |          |           |            |           | 
 WHERE b."Id" IN (                                                                                   +|        |          |           |          |           |            |           | 
     SELECT (                                                                                        +|        |          |           |          |           |            |           | 
         SELECT b1.                                                                                   |        |          |           |          |           |            |           | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanNa |    102 |   364.81 |   6253.66 |     0.05 |    998.36 |   37210.17 |      0.17 |           111
(20 rows)

Time: 51.238 ms

3. TOP 20 SLOWEST QUERIES (by average execution time)
-----------------------------------------
These queries consistently take a long time

                                            query_preview                                             | calls | avg_ms  |  max_ms   | total_ms  | pct_total | rows_returned | avg_rows_per_call 
------------------------------------------------------------------------------------------------------+-------+---------+-----------+-----------+-----------+---------------+-------------------
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |    52 | 7866.05 |  26096.65 | 409034.56 |      1.83 |         36574 |            703.35
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |    53 | 5986.96 |  12890.72 | 317308.89 |      1.42 |         16617 |            313.53
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |     5 | 5713.88 |   6550.26 |  28569.39 |      0.13 |          7069 |           1413.80
 VACUUM ANALYZE "library"."BaseItems"                                                                 |     4 | 5244.50 |   9270.56 |  20978.00 |      0.09 |             0 |              0.00
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |    48 | 4442.75 | 110048.00 | 213251.89 |      0.95 |        686245 |          14296.77
 COPY library."BaseItems" ("Id", "Type", "Data", "Path", "StartDate", "EndDate", "ChannelId", "IsMovi |     9 | 4020.63 |   9063.50 |  36185.64 |      0.16 |       1108542 |         123171.33
 ANALYZE library."BaseItems"                                                                          |     2 | 3598.85 |   7191.23 |   7197.69 |      0.03 |             0 |              0.00
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanNa |    76 | 3229.72 |  36337.21 | 245458.47 |      1.10 |        102270 |           1345.66
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanNa |    33 | 2643.22 |   3839.35 |  87226.40 |      0.39 |            93 |              2.82
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |    10 | 2206.52 |   9421.86 |  22065.22 |      0.10 |            42 |              4.20
 SELECT count(*)::int                                                                                +|    33 | 1742.21 |   2566.98 |  57492.87 |      0.26 |            33 |              1.00
 FROM library."BaseItems" AS b                                                                       +|       |         |           |           |           |               | 
 WHERE b."Id" IN (                                                                                   +|       |         |           |           |           |               | 
     SELECT (                                                                                        +|       |         |           |           |           |               | 
         SELECT b1.                                                                                   |       |         |           |           |           |               | 
 SELECT b."Id"                                                                                       +|    10 | 1498.42 |   4254.29 |  14984.18 |      0.07 |             0 |              0.00
 FROM library."BaseItems" AS b                                                                       +|       |         |           |           |           |               | 
 WHERE b."Id" IN (                                                                                   +|       |         |           |           |           |               | 
     SELECT (                                                                                        +|       |         |           |           |           |               | 
         SELECT b1."Id"                                                                              +|       |         |           |           |           |               | 
                                                                                                      |       |         |           |           |           |               | 
 COPY library."PeopleBaseItemMap" ("Role", "ItemId", "PeopleId", "SortOrder", "ListOrder") TO stdout  |     9 | 1351.55 |   2647.12 |  12163.91 |      0.05 |       2709452 |         301050.22
 VACUUM ANALYZE "library"."PeopleBaseItemMap"                                                         |     4 | 1346.24 |   2440.13 |   5384.96 |      0.02 |             0 |              0.00
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanNa |    45 | 1262.59 |   3901.64 |  56816.60 |      0.25 |           156 |              3.47
 COPY library."BaseItemImageInfos" ("Id", "Path", "DateModified", "ImageType", "Width", "Height", "Bl |    10 | 1096.78 |   2229.77 |  10967.80 |      0.05 |        786232 |          78623.20
 VACUUM ANALYZE "library"."BaseItemProviders"                                                         |     4 | 1071.47 |   1891.55 |   4285.89 |      0.02 |             0 |              0.00
 VACUUM ANALYZE "library"."BaseItemImageInfos"                                                        |     4 | 1034.92 |   1394.17 |   4139.68 |      0.02 |             0 |              0.00
 SELECT count(*)::int                                                                                +|    45 | 1026.64 |   6541.00 |  46198.75 |      0.21 |            45 |              1.00
 FROM library."BaseItems" AS b                                                                       +|       |         |           |           |           |               | 
 WHERE b."Id" IN (                                                                                   +|       |         |           |           |           |               | 
     SELECT (                                                                                        +|       |         |           |           |           |               | 
         SELECT b1.                                                                                   |       |         |           |           |           |               | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanNa |    20 | 1006.45 |   4595.54 |  20129.03 |      0.09 |            36 |              1.80
(20 rows)

Time: 40.941 ms

4. QUERIES WITH HIGHEST TOTAL TIME
-----------------------------------------
These queries consume the most total database time

                                            query_preview                                             |  calls  | avg_ms  |  max_ms   |  total_ms  | pct_total | total_minutes 
------------------------------------------------------------------------------------------------------+---------+---------+-----------+------------+-----------+---------------
 SELECT p."Id", p."Name", p."PersonType"                                                             +|  144055 |   54.79 |    492.43 | 7893097.65 |     35.23 |        131.55
 FROM library."Peoples" AS p                                                                         +|         |         |           |            |           | 
 WHERE p."Name" || $2 || COALESCE                                                                     |         |         |           |            |           | 
 SELECT i."ItemValueId", i."CleanValue", i."Type", i."Value"                                         +|  504947 |    4.60 |     75.73 | 2321444.65 |     10.36 |         38.69
 FROM library."ItemValues" AS i                                                                      +|         |         |           |            |           | 
 WHERE i."                                                                                            |         |         |           |            |           | 
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanNa |   13091 |  122.88 |   1802.92 | 1608602.65 |      7.18 |         26.81
 UPDATE library."UserData" SET "AudioStreamIndex" = $1, "IsFavorite" = $2, "LastPlayedDate" = $3, "Li |   14316 |  106.91 |  23851.53 | 1530501.42 |      6.83 |         25.51
 SELECT b4."Id", b4."Album", b4."AlbumArtists", b4."Artists", b4."Audio", b4."ChannelId", b4."CleanNa | 2889749 |    0.31 |    335.59 |  901511.98 |      4.02 |         15.03
 INSERT INTO library."ItemValuesMap" ("ItemId", "ItemValueId")                                       +| 1235789 |    0.64 |   5333.12 |  790211.42 |      3.53 |         13.17
 VALUES ($1, $2)                                                                                      |         |         |           |            |           | 
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanNa |   79571 |    9.21 |   7635.50 |  732567.21 |      3.27 |         12.21
 INSERT INTO library."BaseItemProviders" ("ItemId", "ProviderId", "ProviderValue")                   +|  999530 |    0.63 |    234.76 |  630878.79 |      2.82 |         10.51
 VALUES ($1, $2, $3                                                                                   |         |         |           |            |           | 
 INSERT INTO library."BaseItemImageInfos" ("Id", "Blurhash", "DateModified", "Height", "ImageType", " |  864323 |    0.70 |   2034.42 |  602376.44 |      2.69 |         10.04
 INSERT INTO library."PeopleBaseItemMap" ("ItemId", "PeopleId", "Role", "ListOrder", "SortOrder")    +|  610789 |    0.79 |    291.09 |  482682.25 |      2.15 |          8.04
 VAL                                                                                                  |         |         |           |            |           | 
 UPDATE library."BaseItems" SET "Album" = $1, "AlbumArtists" = $2, "Artists" = $3, "Audio" = $4, "Cha |  406513 |    1.02 |   9426.48 |  412669.19 |      1.84 |          6.88
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |      52 | 7866.05 |  26096.65 |  409034.56 |      1.83 |          6.82
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanNa |    7178 |   47.96 |   1879.04 |  344265.69 |      1.54 |          5.74
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |      53 | 5986.96 |  12890.72 |  317308.89 |      1.42 |          5.29
 SELECT p."Id", p."Name", p."PersonType"                                                             +|  211825 |    1.16 |  12094.95 |  246756.24 |      1.10 |          4.11
 FROM library."Peoples" AS p                                                                         +|         |         |           |            |           | 
 WHERE EXISTS (                                                                                      +|         |         |           |            |           | 
     SELECT $3                                                                                       +|         |         |           |            |           | 
                                                                                                      |         |         |           |            |           | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanNa |      76 | 3229.72 |  36337.21 |  245458.47 |      1.10 |          4.09
 SELECT b2."Id", b2."Album", b2."AlbumArtists", b2."Artists", b2."Audio", b2."ChannelId", b2."CleanNa |   37283 |    6.53 |   3843.17 |  243335.21 |      1.09 |          4.06
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |      48 | 4442.75 | 110048.00 |  213251.89 |      0.95 |          3.55
 INSERT INTO library."BaseItems" ("Id", "Album", "AlbumArtists", "Artists", "Audio", "ChannelId", "Cl |  132792 |    1.44 |   3171.83 |  190839.23 |      0.85 |          3.18
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |    3801 |   37.51 |    292.16 |  142583.20 |      0.64 |          2.38
(20 rows)

Time: 44.997 ms

5. BASEITEMS TABLE QUERIES ANALYSIS
-----------------------------------------
Focusing on BaseItems table (where 110-second queries occur)

                                                                     query_preview                                                                      |  calls  | avg_ms  |  max_ms   | min_ms  |  total_ms  | rows_returned | avg_rows_per_call | performance_rating  
--------------------------------------------------------------------------------------------------------------------------------------------------------+---------+---------+-----------+---------+------------+---------------+-------------------+---------------------
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      48 | 4442.75 | 110048.00 |    0.06 |  213251.89 |        686245 |          14296.77 | ≡ƒöÑ CRITICAL (>100s)
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      76 | 3229.72 |  36337.21 |    4.97 |  245458.47 |        102270 |           1345.66 | ΓÜá∩╕Å SLOW (>10s)
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      52 | 7866.05 |  26096.65 | 5006.51 |  409034.56 |         36574 |            703.35 | ΓÜá∩╕Å SLOW (>10s)
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      53 | 5986.96 |  12890.72 | 5072.22 |  317308.89 |         16617 |            313.53 | ΓÜá∩╕Å SLOW (>10s)
 UPDATE library."BaseItems" SET "Album" = $1, "AlbumArtists" = $2, "Artists" = $3, "Audio" = $4, "ChannelId" = $5, "CleanName" = $6, "CommunityRating"  |  406513 |    1.02 |   9426.48 |    0.05 |  412669.19 |        406513 |              1.00 | ΓÜí MODERATE (>1s)
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      10 | 2206.52 |   9421.86 |  251.47 |   22065.22 |            42 |              4.20 | ΓÜí MODERATE (>1s)
 VACUUM ANALYZE "library"."BaseItems"                                                                                                                   |       4 | 5244.50 |   9270.56 | 3148.60 |   20978.00 |             0 |              0.00 | ΓÜí MODERATE (>1s)
 COPY library."BaseItems" ("Id", "Type", "Data", "Path", "StartDate", "EndDate", "ChannelId", "IsMovie", "CommunityRating", "CustomRating", "IndexNumbe |       9 | 4020.63 |   9063.50 | 2538.74 |   36185.64 |       1108542 |         123171.33 | ΓÜí MODERATE (>1s)
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |   79571 |    9.21 |   7635.50 |    0.04 |  732567.21 |      10190469 |            128.07 | ΓÜí MODERATE (>1s)
 SELECT b5."Id", b5."Album", b5."AlbumArtists", b5."Artists", b5."Audio", b5."ChannelId", b5."CleanName", b5."CommunityRating", b5."CriticRating", b5." |      33 |  740.05 |   7215.29 |    0.18 |   24421.52 |           291 |              8.82 | ΓÜí MODERATE (>1s)
 ANALYZE library."BaseItems"                                                                                                                            |       2 | 3598.85 |   7191.23 |    6.46 |    7197.69 |             0 |              0.00 | ΓÜí MODERATE (>1s)
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      53 |  323.45 |   6859.71 |    4.87 |   17142.89 |         21813 |            411.57 | ΓÜí MODERATE (>1s)
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |       5 | 5713.88 |   6550.26 | 5236.67 |   28569.39 |          7069 |           1413.80 | ΓÜí MODERATE (>1s)
 SELECT count(*)::int                                                                                                                                  +|      45 | 1026.64 |   6541.00 |  194.07 |   46198.75 |            45 |              1.00 | ΓÜí MODERATE (>1s)
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |     102 |  364.81 |   6253.66 |    0.05 |   37210.17 |           111 |              1.09 | ΓÜí MODERATE (>1s)
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |     136 |  476.08 |   5457.70 |    0.11 |   64747.39 |         40040 |            294.41 | ΓÜí MODERATE (>1s)
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      20 | 1006.45 |   4595.54 |    0.04 |   20129.03 |            36 |              1.80 | ΓÜí MODERATE (>1s)
 SELECT b."Id"                                                                                                                                         +|      10 | 1498.42 |   4254.29 |  223.47 |   14984.18 |             0 |              0.00 | ΓÜí MODERATE (>1s)
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
         WHERE                                                                                                                                          |         |         |           |         |            |               |                   | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      45 | 1262.59 |   3901.64 |  158.53 |   56816.60 |           156 |              3.47 | ΓÜí MODERATE (>1s)
 SELECT b2."Id", b2."Album", b2."AlbumArtists", b2."Artists", b2."Audio", b2."ChannelId", b2."CleanName", b2."CommunityRating", b2."CriticRating", b2." |   37283 |    6.53 |   3843.17 |    0.13 |  243335.21 |        111524 |              2.99 | ΓÜí MODERATE (>1s)
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      33 | 2643.22 |   3839.35 |  282.95 |   87226.40 |            93 |              2.82 | ΓÜí MODERATE (>1s)
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      11 |  693.16 |   3692.32 |    0.20 |    7624.80 |             6 |              0.55 | ΓÜí MODERATE (>1s)
 SELECT b."SeriesPresentationUniqueKey"                                                                                                                +|     153 |  218.83 |   3323.96 |    0.02 |   33480.59 |         37228 |            243.32 | ΓÜí MODERATE (>1s)
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 INNER JOIN (                                                                                                                                          +|         |         |           |         |            |               |                   | 
     SELECT u."ItemId", u."UserId", u."LastPlayedDate"                                                                                                 +|         |         |           |         |            |               |                   | 
     FROM libra                                                                                                                                         |         |         |           |         |            |               |                   | 
 INSERT INTO library."BaseItems" ("Id", "Album", "AlbumArtists", "Artists", "Audio", "ChannelId", "CleanName", "CommunityRating", "CriticRating", "Cust |  132792 |    1.44 |   3171.83 |    0.21 |  190839.23 |        132792 |              1.00 | ΓÜí MODERATE (>1s)
 SELECT count(*)::int                                                                                                                                  +|      33 | 1742.21 |   2566.98 |  351.04 |   57492.87 |            33 |              1.00 | ΓÜí MODERATE (>1s)
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      67 |  596.08 |   2529.19 |    0.09 |   39937.50 |          8935 |            133.36 | ΓÜí MODERATE (>1s)
 SELECT c."ItemId", c."ChapterIndex", c."ImageDateModified", c."ImagePath", c."Name", c."StartPositionTicks", b."Path" AS "baseItemPath"               +|    5122 |    0.80 |   2337.80 |    0.03 |    4108.88 |         30234 |              5.90 | ΓÜí MODERATE (>1s)
 FROM library."                                                                                                                                         |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |       1 | 2269.42 |   2269.42 | 2269.42 |    2269.42 |        115797 |         115797.00 | ΓÜí MODERATE (>1s)
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      22 |  198.08 |   2263.86 |    0.38 |    4357.85 |             1 |              0.05 | ΓÜí MODERATE (>1s)
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |    7178 |   47.96 |   1879.04 |    0.05 |  344265.69 |       4516113 |            629.16 | ΓÜí MODERATE (>1s)
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |   13091 |  122.88 |   1802.92 |    0.05 | 1608602.65 |      20880916 |           1595.06 | ΓÜí MODERATE (>1s)
 SELECT b."Id"                                                                                                                                         +|      23 |  400.21 |   1491.93 |   81.38 |    9204.91 |           406 |             17.65 | ΓÜí MODERATE (>1s)
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
         WHERE                                                                                                                                          |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |   21257 |    4.82 |   1377.30 |    0.06 |  102450.42 |        688174 |             32.37 | ΓÜí MODERATE (>1s)
 SELECT (                                                                                                                                              +|       3 |  717.08 |   1204.75 |  357.93 |    2151.23 |           138 |             46.00 | ΓÜí MODERATE (>1s)
     SELECT i5."Value"                                                                                                                                 +|         |         |           |         |            |               |                   | 
     FROM library."ItemValuesMap" AS i2                                                                                                                +|         |         |           |         |            |               |                   | 
     INNER JOIN library."ItemValues" AS i3 ON i2."ItemValueId" = i3."ItemValueId"                                                                       |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      43 |   48.88 |   1185.60 |    1.06 |    2101.64 |          6748 |            156.93 | ΓÜí MODERATE (>1s)
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |     558 |   24.25 |   1088.96 |    0.13 |   13532.18 |        185431 |            332.31 | ΓÜí MODERATE (>1s)
 CREATE INDEX CONCURRENTLY IF NOT EXISTS "IX_BaseItems_PresentationKeys_Composite" \r                                                                  +|       1 | 1040.79 |   1040.79 | 1040.79 |    1040.79 |             0 |              0.00 | ΓÜí MODERATE (>1s)
 ON library."BaseItems" ("PresentationUniqueKey", "SeriesPresentati                                                                                     |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |     158 |  245.09 |    958.33 |    2.61 |   38724.92 |        636472 |           4028.30 | Γ£à FAST
 SELECT count(*)::int                                                                                                                                  +|      97 |   68.52 |    735.48 |   23.66 |    6646.75 |            97 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 SELECT b1."Id"                                                                                                                                        +|     170 |   30.92 |    719.17 |    0.13 |    5256.13 |           359 |              2.11 | Γ£à FAST
 FROM (                                                                                                                                                +|         |         |           |         |            |               |                   | 
     SELECT DISTINCT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRatin                       |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |     136 |   91.75 |    685.05 |   37.11 |   12478.62 |         67013 |            492.74 | Γ£à FAST
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      72 |   99.06 |    647.58 |   43.12 |    7132.04 |         38202 |            530.58 | Γ£à FAST
 SELECT (                                                                                                                                              +|       3 |  401.23 |    635.32 |   55.40 |    1203.68 |            40 |             13.33 | Γ£à FAST
     SELECT i5."Value"                                                                                                                                 +|         |         |           |         |            |               |                   | 
     FROM library."ItemValuesMap" AS i2                                                                                                                +|         |         |           |         |            |               |                   | 
     INNER JOIN library."ItemValues" AS i3 ON i2."ItemValueId" = i3."ItemValueId"                                                                       |         |         |           |         |            |               |                   | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      59 |  313.86 |    600.00 |   61.15 |   18517.74 |         75438 |           1278.61 | Γ£à FAST
 SELECT b."Id"                                                                                                                                         +|      18 |  314.74 |    486.03 |  117.86 |    5665.24 |           256 |             14.22 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
         WHERE                                                                                                                                          |         |         |           |         |            |               |                   | 
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |       5 |  230.28 |    485.30 |  152.26 |    1151.42 |          2200 |            440.00 | Γ£à FAST
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      15 |   93.05 |    451.78 |   36.57 |    1395.75 |          6906 |            460.40 | Γ£à FAST
 SELECT b."Id"                                                                                                                                         +|       2 |  443.38 |    444.00 |  442.77 |     886.77 |            32 |             16.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
         WHERE                                                                                                                                          |         |         |           |         |            |               |                   | 
 SELECT b."Id"                                                                                                                                         +|       3 |  413.61 |    424.49 |  401.68 |    1240.82 |            36 |             12.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
         WHERE                                                                                                                                          |         |         |           |         |            |               |                   | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      10 |  114.14 |    399.24 |   45.46 |    1141.38 |          4760 |            476.00 | Γ£à FAST
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      50 |   11.94 |    357.75 |    0.33 |     597.11 |          4292 |             85.84 | Γ£à FAST
 SELECT b."Id"                                                                                                                                         +|       2 |  271.94 |    349.40 |  194.48 |     543.89 |            24 |             12.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
         WHERE                                                                                                                                          |         |         |           |         |            |               |                   | 
 CREATE INDEX CONCURRENTLY IF NOT EXISTS "IX_BaseItems_SeriesPresentationUniqueKey" \r                                                                 +|       1 |  345.05 |    345.05 |  345.05 |     345.05 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("SeriesPresentationUniqueKey")\r                                                                                              +|         |         |           |         |            |               |                   | 
 WHERE "Se                                                                                                                                              |         |         |           |         |            |               |                   | 
 SELECT b4."Id", b4."Album", b4."AlbumArtists", b4."Artists", b4."Audio", b4."ChannelId", b4."CleanName", b4."CommunityRating", b4."CriticRating", b4." | 2889749 |    0.31 |    335.59 |    0.02 |  901511.98 |       5681986 |              1.97 | Γ£à FAST
 SELECT count(*)::int                                                                                                                                  +|       5 |  163.02 |    312.32 |   42.93 |     815.08 |             5 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b2."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b2                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |    3801 |   37.51 |    292.16 |    0.27 |  142583.20 |       2053236 |            540.18 | Γ£à FAST
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      41 |   23.86 |    277.31 |    0.38 |     978.32 |            41 |              1.00 | Γ£à FAST
 CREATE INDEX CONCURRENTLY IF NOT EXISTS "IX_BaseItems_Type_TopParentId" \r                                                                            +|       1 |  270.73 |    270.73 |  270.73 |     270.73 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("Type", "TopParentId")\r                                                                                                      +|         |         |           |         |            |               |                   | 
 WHERE "TopParentId" IS NOT N                                                                                                                           |         |         |           |         |            |               |                   | 
 CREATE INDEX CONCURRENTLY IF NOT EXISTS "IX_BaseItems_Series_Grouping" \r                                                                             +|       1 |  268.90 |    268.90 |  268.90 |     268.90 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("Type", "TopParentId", "PresentationUniqueKey", "Id")                                                                          |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      14 |   70.77 |    265.27 |    2.76 |     990.80 |          3256 |            232.57 | Γ£à FAST
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      52 |   25.12 |    260.97 |    0.99 |    1306.24 |          9243 |            177.75 | Γ£à FAST
 SELECT b5."Id", b5."Album", b5."AlbumArtists", b5."Artists", b5."Audio", b5."ChannelId", b5."CleanName", b5."CommunityRating", b5."CriticRating", b5." |       5 |  142.53 |    253.82 |   78.58 |     712.66 |          3618 |            723.60 | Γ£à FAST
 SELECT b1."Id"                                                                                                                                        +|      12 |  131.78 |    239.31 |   71.34 |    1581.36 |           360 |             30.00 | Γ£à FAST
 FROM (                                                                                                                                                +|         |         |           |         |            |               |                   | 
     SELECT DISTINCT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRatin                       |         |         |           |         |            |               |                   | 
 SELECT b1."Id"                                                                                                                                        +|       3 |  178.73 |    234.63 |  147.08 |     536.19 |             0 |              0.00 | Γ£à FAST
 FROM (                                                                                                                                                +|         |         |           |         |            |               |                   | 
     SELECT DISTINCT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRatin                       |         |         |           |         |            |               |                   | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      74 |   29.24 |    229.07 |    3.43 |    2163.88 |         31374 |            423.97 | Γ£à FAST
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |       9 |  118.56 |    165.46 |   85.25 |    1067.06 |          6938 |            770.89 | Γ£à FAST
 explain analyze SELECT \r                                                                                                                             +|       1 |  151.07 |    151.07 |  151.07 |     151.07 |             0 |              0.00 | Γ£à FAST
     b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", \r                                                                              +|         |         |           |         |            |               |                   | 
     b0."ChannelId", b0."CleanName", b0."CommunityRati                                                                                                  |         |         |           |         |            |               |                   | 
 explain analyze SELECT \r                                                                                                                             +|       1 |  136.35 |    136.35 |  136.35 |     136.35 |          5802 |           5802.00 | Γ£à FAST
     b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", \r                                                                              +|         |         |           |         |            |               |                   | 
     b0."ChannelId", b0."CleanName", b0."CommunityRati                                                                                                  |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      37 |   29.89 |    136.05 |    0.28 |    1105.79 |          3527 |             95.32 | Γ£à FAST
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |   37242 |    0.32 |    133.61 |    0.03 |   11847.72 |          1010 |              0.03 | Γ£à FAST
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |       8 |   95.09 |    120.03 |    7.96 |     760.70 |          5361 |            670.13 | Γ£à FAST
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |       5 |   53.97 |    106.81 |   28.14 |     269.86 |             0 |              0.00 | Γ£à FAST
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      68 |   11.38 |     91.33 |    1.74 |     774.08 |          7090 |            104.26 | Γ£à FAST
 SELECT count(*)::int                                                                                                                                  +|      91 |   13.46 |     79.14 |    1.15 |    1224.49 |            91 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 SELECT b."Id"                                                                                                                                         +|       8 |    9.62 |     75.69 |    0.06 |      76.96 |             0 |              0.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."ParentId" = ANY ($1) OR (b."ParentId" IS NULL AND array_position($1, $2) IS NOT NULL)                                                         |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |   37283 |    0.21 |     65.68 |    0.03 |    7877.45 |             5 |              0.00 | Γ£à FAST
 SELECT b."Id"                                                                                                                                         +|     456 |    1.37 |     50.18 |    0.06 |     624.77 |            16 |              0.04 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE (b."ParentId" = ANY ($1) OR (b."ParentId" IS NULL AND array_position($1, $2) IS NOT NULL)) AND (b."I                                             |         |         |           |         |            |               |                   | 
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |     786 |    0.34 |     40.64 |    0.05 |     263.36 |             0 |              0.00 | Γ£à FAST
 SELECT count(*)::int                                                                                                                                  +|    5800 |    0.17 |     39.46 |    0.03 |     972.44 |          5800 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Type" = $3 AND b."IsVirtualItem" = $1 AND b."SeriesPresentationUniqueKey" = $2                                                                |         |         |           |         |            |               |                   | 
 SELECT b1."Id"                                                                                                                                        +|       8 |    9.87 |     35.34 |    0.10 |      78.92 |            32 |              4.00 | Γ£à FAST
 FROM (                                                                                                                                                +|         |         |           |         |            |               |                   | 
     SELECT DISTINCT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRatin                       |         |         |           |         |            |               |                   | 
 SELECT b1."Id"                                                                                                                                        +|       4 |   13.07 |     34.83 |    0.12 |      52.26 |            16 |              4.00 | Γ£à FAST
 FROM (                                                                                                                                                +|         |         |           |         |            |               |                   | 
     SELECT DISTINCT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRatin                       |         |         |           |         |            |               |                   | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      58 |   16.12 |     30.60 |    7.37 |     935.08 |         10479 |            180.67 | Γ£à FAST
 SELECT b."Id"                                                                                                                                         +|       2 |   17.88 |     27.55 |    8.21 |      35.75 |            30 |             15.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
         WHERE                                                                                                                                          |         |         |           |         |            |               |                   | 
 SELECT b."Type" AS "Key", count(*)::int AS "Count"                                                                                                    +|      12 |   10.39 |     26.14 |    0.77 |     124.68 |            32 |              2.67 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Type" = ANY ($1) AND EXISTS (                                                                                                                +|         |         |           |         |            |               |                   | 
     SELECT $3                                                                                                                                         +|         |         |           |         |            |               |                   | 
     FROM library                                                                                                                                       |         |         |           |         |            |               |                   | 
 CREATE INDEX CONCURRENTLY IF NOT EXISTS "IX_BaseItems_PresentationUniqueKey" \r                                                                       +|       1 |   25.32 |     25.32 |   25.32 |      25.32 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("PresentationUniqueKey") \r                                                                                                   +|         |         |           |         |            |               |                   | 
 WHERE "PresentationU                                                                                                                                   |         |         |           |         |            |               |                   | 
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |       3 |   10.04 |     20.31 |    4.64 |      30.11 |             0 |              0.00 | Γ£à FAST
 SELECT b2."Id", b2."Album", b2."AlbumArtists", b2."Artists", b2."Audio", b2."ChannelId", b2."CleanName", b2."CommunityRating", b2."CriticRating", b2." |      55 |    0.86 |     19.51 |    0.07 |      47.22 |             0 |              0.00 | Γ£à FAST
 SELECT count(*)::int                                                                                                                                  +|      58 |    7.64 |     18.08 |    3.29 |     443.20 |            58 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 SELECT b5."Id", b5."Album", b5."AlbumArtists", b5."Artists", b5."Audio", b5."ChannelId", b5."CleanName", b5."CommunityRating", b5."CriticRating", b5." |       3 |    9.94 |     15.33 |    3.09 |      29.81 |           282 |             94.00 | Γ£à FAST
 SELECT NOT EXISTS (                                                                                                                                   +|    1200 |    0.83 |     15.00 |    0.04 |     994.30 |          1200 |              1.00 | Γ£à FAST
     SELECT $3                                                                                                                                         +|         |         |           |         |            |               |                   | 
     FROM library."BaseItems" AS b                                                                                                                     +|         |         |           |         |            |               |                   | 
     WHERE (b."ParentId" = ANY ($1) OR (b."ParentId" IS NULL AND array_position($1,                                                                     |         |         |           |         |            |               |                   | 
 SELECT b5."Id", b5."Album", b5."AlbumArtists", b5."Artists", b5."Audio", b5."ChannelId", b5."CleanName", b5."CommunityRating", b5."CriticRating", b5." |      13 |    4.55 |     11.83 |    1.44 |      59.13 |           305 |             23.46 | Γ£à FAST
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |      69 |    0.48 |     11.68 |    0.12 |      33.08 |            68 |              0.99 | Γ£à FAST
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |       3 |    8.84 |     11.19 |    7.44 |      26.52 |            21 |              7.00 | Γ£à FAST
 CREATE TABLE library."BaseItems" (                                                                                                                    +|       1 |   11.06 |     11.06 |   11.06 |      11.06 |             0 |              0.00 | Γ£à FAST
     "Id" uuid NOT NULL,                                                                                                                               +|         |         |           |         |            |               |                   | 
     "Type" text NOT NULL,                                                                                                                             +|         |         |           |         |            |               |                   | 
     "Data" text,                                                                                                                                      +|         |         |           |         |            |               |                   | 
     "Path" text,                                                                                                                                      +|         |         |           |         |            |               |                   | 
     "StartDate" timestamp with                                                                                                                         |         |         |           |         |            |               |                   | 
 SELECT COUNT(*) FROM (SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b |       1 |   10.95 |     10.95 |   10.95 |      10.95 |             1 |              1.00 | Γ£à FAST
 SELECT count(*)::int                                                                                                                                  +|       3 |    8.93 |      9.64 |    8.55 |      26.78 |             3 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 SELECT count(*)::int                                                                                                                                  +|      16 |    2.78 |      8.90 |    0.81 |      44.51 |            16 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b2."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b2                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 CREATE TABLE library."MediaStreamInfos" (                                                                                                             +|       1 |    8.05 |      8.05 |    8.05 |       8.05 |             0 |              0.00 | Γ£à FAST
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     "StreamIndex" integer NOT NULL,                                                                                                                   +|         |         |           |         |            |               |                   | 
     "StreamType" integer NOT NULL,                                                                                                                    +|         |         |           |         |            |               |                   | 
     "Code                                                                                                                                              |         |         |           |         |            |               |                   | 
 CREATE TABLE library."PeopleBaseItemMap" (                                                                                                            +|       1 |    7.44 |      7.44 |    7.44 |       7.44 |             0 |              0.00 | Γ£à FAST
     "Role" text NOT NULL,                                                                                                                             +|         |         |           |         |            |               |                   | 
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     "PeopleId" uuid NOT NULL,                                                                                                                         +|         |         |           |         |            |               |                   | 
     "SortOrder" integer                                                                                                                                |         |         |           |         |            |               |                   | 
 SELECT EXISTS (                                                                                                                                       +|  383570 |    0.06 |      6.67 |    0.02 |   23137.61 |        383570 |              1.00 | Γ£à FAST
     SELECT $2                                                                                                                                         +|         |         |           |         |            |               |                   | 
     FROM library."BaseItems" AS b                                                                                                                     +|         |         |           |         |            |               |                   | 
     WHERE b."Id" = $1)                                                                                                                                 |         |         |           |         |            |               |                   | 
 SELECT b."Id"                                                                                                                                         +|  799069 |    0.07 |      6.14 |    0.00 |   55690.06 |       1831964 |              2.29 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" = ANY ($1)                                                                                                                                |         |         |           |         |            |               |                   | 
 CREATE TABLE library."Chapters" (                                                                                                                     +|       1 |    6.13 |      6.13 |    6.13 |       6.13 |             0 |              0.00 | Γ£à FAST
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     "ChapterIndex" integer NOT NULL,                                                                                                                  +|         |         |           |         |            |               |                   | 
     "StartPositionTicks" bigint NOT NULL,                                                                                                             +|         |         |           |         |            |               |                   | 
     "Name                                                                                                                                              |         |         |           |         |            |               |                   | 
 CREATE TABLE library."BaseItemImageInfos" (                                                                                                           +|       1 |    6.06 |      6.06 |    6.06 |       6.06 |             0 |              0.00 | Γ£à FAST
     "Id" uuid NOT NULL,                                                                                                                               +|         |         |           |         |            |               |                   | 
     "Path" text NOT NULL,                                                                                                                             +|         |         |           |         |            |               |                   | 
     "DateModified" timestamp with time zone,                                                                                                          +|         |         |           |         |            |               |                   | 
     "ImageT                                                                                                                                            |         |         |           |         |            |               |                   | 
 CREATE TABLE library."BaseItemProviders" (                                                                                                            +|       1 |    5.94 |      5.94 |    5.94 |       5.94 |             0 |              0.00 | Γ£à FAST
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     "ProviderId" text NOT NULL,                                                                                                                       +|         |         |           |         |            |               |                   | 
     "ProviderValue" text NOT NULL,                                                                                                                    +|         |         |           |         |            |               |                   | 
     CONSTRAI                                                                                                                                           |         |         |           |         |            |               |                   | 
 CREATE TABLE library."KeyframeData" (                                                                                                                 +|       1 |    5.83 |      5.83 |    5.83 |       5.83 |             0 |              0.00 | Γ£à FAST
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     "TotalDuration" bigint NOT NULL,                                                                                                                  +|         |         |           |         |            |               |                   | 
     "KeyframeTicks" bigint[],                                                                                                                         +|         |         |           |         |            |               |                   | 
     CONSTRAINT "P                                                                                                                                      |         |         |           |         |            |               |                   | 
 CREATE TABLE library."AttachmentStreamInfos" (                                                                                                        +|       1 |    5.55 |      5.55 |    5.55 |       5.55 |             0 |              0.00 | Γ£à FAST
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     "Index" integer NOT NULL,                                                                                                                         +|         |         |           |         |            |               |                   | 
     "Codec" text,                                                                                                                                     +|         |         |           |         |            |               |                   | 
     "CodecTag" text,                                                                                                                                  +|         |         |           |         |            |               |                   | 
     "C                                                                                                                                                 |         |         |           |         |            |               |                   | 
 SELECT bi.* FROM "library"."BaseItems" AS bi                                                                                                           |       1 |    5.48 |      5.48 |    5.48 |       5.48 |           200 |            200.00 | Γ£à FAST
 CREATE TABLE library."ItemValuesMap" (                                                                                                                +|       1 |    5.39 |      5.39 |    5.39 |       5.39 |             0 |              0.00 | Γ£à FAST
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     "ItemValueId" uuid NOT NULL,                                                                                                                      +|         |         |           |         |            |               |                   | 
     CONSTRAINT "PK_ItemValuesMap" PRIMARY KEY ("It                                                                                                     |         |         |           |         |            |               |                   | 
 SELECT b0."Id", b0."Blurhash", b0."DateModified", b0."Height", b0."ImageType", b0."ItemId", b0."Path", b0."Width", b."Id"                             +|     176 |    0.67 |      5.24 |    0.04 |     117.68 |          8770 |             49.83 | Γ£à FAST
 FROM library."BaseItems" AS                                                                                                                            |         |         |           |         |            |               |                   | 
 CREATE TABLE library."AncestorIds" (                                                                                                                  +|       1 |    4.75 |      4.75 |    4.75 |       4.75 |             0 |              0.00 | Γ£à FAST
     "ParentItemId" uuid NOT NULL,                                                                                                                     +|         |         |           |         |            |               |                   | 
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     CONSTRAINT "PK_AncestorIds" PRIMARY KEY ("ItemI                                                                                                    |         |         |           |         |            |               |                   | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |      42 |    1.35 |      4.29 |    0.11 |      56.89 |           690 |             16.43 | Γ£à FAST
 CREATE TABLE library."UserData" (                                                                                                                     +|       1 |    4.14 |      4.14 |    4.14 |       4.14 |             0 |              0.00 | Γ£à FAST
     "CustomDataKey" text NOT NULL,                                                                                                                    +|         |         |           |         |            |               |                   | 
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     "UserId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     "Rating" double preci                                                                                                                              |         |         |           |         |            |               |                   | 
 SELECT count(*)::int                                                                                                                                  +|       5 |    1.74 |      4.14 |    0.37 |       8.69 |             5 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 CREATE TABLE library."BaseItemTrailerTypes" (                                                                                                         +|       1 |    4.10 |      4.10 |    4.10 |       4.10 |             0 |              0.00 | Γ£à FAST
     "Id" integer NOT NULL,                                                                                                                            +|         |         |           |         |            |               |                   | 
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     CONSTRAINT "PK_BaseItemTrailerTypes" PRIMARY                                                                                                       |         |         |           |         |            |               |                   | 
 CREATE TABLE library."BaseItemMetadataFields" (                                                                                                       +|       1 |    3.89 |      3.89 |    3.89 |       3.89 |             0 |              0.00 | Γ£à FAST
     "Id" integer NOT NULL,                                                                                                                            +|         |         |           |         |            |               |                   | 
     "ItemId" uuid NOT NULL,                                                                                                                           +|         |         |           |         |            |               |                   | 
     CONSTRAINT "PK_BaseItemMetadataFields" PRIM                                                                                                        |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |     178 |    0.67 |      3.37 |    0.05 |     118.50 |          1552 |              8.72 | Γ£à FAST
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |      30 |    0.18 |      2.48 |    0.04 |       5.26 |             0 |              0.00 | Γ£à FAST
 SELECT b."Id"                                                                                                                                         +|     344 |    0.29 |      2.36 |    0.05 |     100.32 |             0 |              0.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."ParentId" IN ($1 /*, ... */) AND (b."IsFolder" OR b."IsVirtualItem")                                                                          |         |         |           |         |            |               |                   | 
 CREATE INDEX IF NOT EXISTS baseitems_communityrating_idx \r                                                                                           +|       1 |    2.13 |      2.13 |    2.13 |       2.13 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("CommunityRating" DESC)                                                                                                        |         |         |           |         |            |               |                   | 
 SELECT u."ItemId", u."UserId", u."CustomDataKey", u."AudioStreamIndex", u."IsFavorite", u."LastPlayedDate", u."Likes", u."PlayCount", u."PlaybackPosit |     178 |    0.29 |      1.99 |    0.04 |      52.34 |           114 |              0.64 | Γ£à FAST
 SELECT b."Id"                                                                                                                                         +|       1 |    1.89 |      1.89 |    1.89 |       1.89 |             1 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
         WHERE                                                                                                                                          |         |         |           |         |            |               |                   | 
 CREATE INDEX IF NOT EXISTS idx_baseitems_topparentid_isfolder\r                                                                                       +|       1 |    1.86 |      1.86 |    1.86 |       1.86 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("TopParentId", "IsFolder", "IsVirtualItem")\r                                                                                 +|         |         |           |         |            |               |                   | 
 WHERE "BaseItems".                                                                                                                                     |         |         |           |         |            |               |                   | 
 CREATE INDEX IF NOT EXISTS idx_baseitems_type_isvirtualitem_topparentid\r                                                                             +|       1 |    1.83 |      1.83 |    1.83 |       1.83 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("Type", "IsVirtualItem", "TopParentId")\r                                                                                     +|         |         |           |         |            |               |                   | 
 WHERE "BaseI                                                                                                                                           |         |         |           |         |            |               |                   | 
 CREATE INDEX IF NOT EXISTS idx_baseitems_datecreated_filtered\r                                                                                       +|       1 |    1.66 |      1.66 |    1.66 |       1.66 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("DateCreated" DESC, "Type", "IsVirtualItem")\r                                                                                +|         |         |           |         |            |               |                   | 
 WHERE "BaseItems"                                                                                                                                      |         |         |           |         |            |               |                   | 
 SELECT b1."Id", b1."Album", b1."AlbumArtists", b1."Artists", b1."Audio", b1."ChannelId", b1."CleanName", b1."CommunityRating", b1."CriticRating", b1." |      39 |    0.55 |      1.63 |    0.33 |      21.58 |            39 |              1.00 | Γ£à FAST
 CREATE INDEX IF NOT EXISTS baseitems_seriespresentationuniquekey_idx \r                                                                               +|       1 |    1.59 |      1.59 |    1.59 |       1.59 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("SeriesPresentationUniqueKey", "IndexNumber", "ParentIn                                                                        |         |         |           |         |            |               |                   | 
 CREATE INDEX IF NOT EXISTS baseitems_datemodified_idx \r                                                                                              +|       1 |    1.58 |      1.58 |    1.58 |       1.58 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("DateModified" DESC)                                                                                                           |         |         |           |         |            |               |                   | 
 LOCK TABLE public."__EFMigrationsHistory", library."__EFMigrationsHistory", activitylog."ActivityLogs", authentication."ApiKeys", library."BaseItems", |      11 |    1.16 |      1.51 |    0.62 |      12.78 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX IF NOT EXISTS baseitems_topparentid_idx \r                                                                                               +|       1 |    1.47 |      1.47 |    1.47 |       1.47 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("TopParentId", "Type")                                                                                                         |         |         |           |         |            |               |                   | 
 SELECT b."Id"                                                                                                                                         +|    1604 |    0.11 |      1.46 |    0.03 |     180.85 |          4625 |              2.88 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."ParentId" = $1 AND (b."IsFolder" OR b."IsVirtualItem")                                                                                        |         |         |           |         |            |               |                   | 
 CREATE INDEX IF NOT EXISTS baseitems_parentid_idx \r                                                                                                  +|       1 |    1.44 |      1.44 |    1.44 |       1.44 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("ParentId", "Type")                                                                                                            |         |         |           |         |            |               |                   | 
 CREATE INDEX IF NOT EXISTS baseitems_datecreated_idx \r                                                                                               +|       1 |    1.40 |      1.40 |    1.40 |       1.40 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("DateCreated" DESC)                                                                                                            |         |         |           |         |            |               |                   | 
 CREATE INDEX IF NOT EXISTS baseitems_premieredate_idx \r                                                                                              +|       1 |    1.38 |      1.38 |    1.38 |       1.38 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("PremiereDate" DESC)                                                                                                           |         |         |           |         |            |               |                   | 
 CREATE INDEX IF NOT EXISTS baseitems_sortname_idx \r                                                                                                  +|       1 |    1.31 |      1.31 |    1.31 |       1.31 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("SortName")                                                                                                                    |         |         |           |         |            |               |                   | 
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |       5 |    0.79 |      1.29 |    0.32 |       3.94 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX IF NOT EXISTS baseitems_productionyear_idx \r                                                                                            +|       1 |    1.27 |      1.27 |    1.27 |       1.27 |             0 |              0.00 | Γ£à FAST
 ON library."BaseItems" ("ProductionYear" DESC)                                                                                                         |         |         |           |         |            |               |                   | 
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |      89 |    0.29 |      1.26 |    0.08 |      25.70 |             0 |              0.00 | Γ£à FAST
 SELECT b1."Id", b1."Blurhash", b1."DateModified", b1."Height", b1."ImageType", b1."ItemId", b1."Path", b1."Width", b."Id"                             +|       2 |    0.97 |      1.24 |    0.70 |       1.94 |           251 |            125.50 | Γ£à FAST
 FROM library."BaseItems" AS                                                                                                                            |         |         |           |         |            |               |                   | 
 CREATE INDEX "IX_BaseItems_Id_Type_IsFolder_IsVirtualItem" ON library."BaseItems" ("Id", "Type", "IsFolder", "IsVirtualItem")                          |       1 |    0.98 |      0.98 |    0.98 |       0.98 |             0 |              0.00 | Γ£à FAST
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |       3 |    0.68 |      0.92 |    0.43 |       2.05 |             0 |              0.00 | Γ£à FAST
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |       3 |    0.75 |      0.91 |    0.51 |       2.26 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_MediaType_TopParentId_IsVirtualItem_PresentationU~" ON library."BaseItems" ("MediaType", "TopParentId", "IsVirtualItem", "P |       1 |    0.90 |      0.90 |    0.90 |       0.90 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_IsFolder_TopParentId_IsVirtualItem_PresentationUn~" ON library."BaseItems" ("IsFolder", "TopParentId", "IsVirtualItem", "Pr |       1 |    0.89 |      0.89 |    0.89 |       0.89 |             0 |              0.00 | Γ£à FAST
 SELECT count(*)::int                                                                                                                                  +|      42 |    0.47 |      0.88 |    0.14 |      19.81 |            42 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 CREATE INDEX "IX_BaseItems_PresentationUniqueKey" ON library."BaseItems" ("PresentationUniqueKey")                                                     |       1 |    0.86 |      0.86 |    0.86 |       0.86 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_Type_TopParentId_IsVirtualItem_PresentationUnique~" ON library."BaseItems" ("Type", "TopParentId", "IsVirtualItem", "Presen |       1 |    0.84 |      0.84 |    0.84 |       0.84 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_Type_TopParentId_StartDate" ON library."BaseItems" ("Type", "TopParentId", "StartDate")                                     |       1 |    0.76 |      0.76 |    0.76 |       0.76 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_ParentId" ON library."BaseItems" ("ParentId")                                                                               |       1 |    0.73 |      0.73 |    0.73 |       0.73 |             0 |              0.00 | Γ£à FAST
 SELECT b3."Id", b3."Album", b3."AlbumArtists", b3."Artists", b3."Audio", b3."ChannelId", b3."CleanName", b3."CommunityRating", b3."CriticRating", b3." |       1 |    0.73 |      0.73 |    0.73 |       0.73 |            12 |             12.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_Type_SeriesPresentationUniqueKey_IsFolder_IsVirtu~" ON library."BaseItems" ("Type", "SeriesPresentationUniqueKey", "IsFolde |       1 |    0.71 |      0.71 |    0.71 |       0.71 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_Type_TopParentId_PresentationUniqueKey" ON library."BaseItems" ("Type", "TopParentId", "PresentationUniqueKey")             |       1 |    0.71 |      0.71 |    0.71 |       0.71 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_Type_TopParentId_Id" ON library."BaseItems" ("Type", "TopParentId", "Id")                                                   |       1 |    0.69 |      0.69 |    0.69 |       0.69 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_TopParentId_Id" ON library."BaseItems" ("TopParentId", "Id")                                                                |       1 |    0.69 |      0.69 |    0.69 |       0.69 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_Type_SeriesPresentationUniqueKey_PresentationUniq~" ON library."BaseItems" ("Type", "SeriesPresentationUniqueKey", "Present |       1 |    0.68 |      0.68 |    0.68 |       0.68 |             0 |              0.00 | Γ£à FAST
 CREATE INDEX "IX_BaseItems_Path" ON library."BaseItems" ("Path")                                                                                       |       1 |    0.67 |      0.67 |    0.67 |       0.67 |             0 |              0.00 | Γ£à FAST
 SELECT b4."Id", b4."Album", b4."AlbumArtists", b4."Artists", b4."Audio", b4."ChannelId", b4."CleanName", b4."CommunityRating", b4."CriticRating", b4." |       2 |    0.47 |      0.52 |    0.42 |       0.95 |             1 |              0.50 | Γ£à FAST
 SELECT count(*)::int                                                                                                                                  +|       1 |    0.46 |      0.46 |    0.46 |       0.46 |             1 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Id" IN (                                                                                                                                     +|         |         |           |         |            |               |                   | 
     SELECT (                                                                                                                                          +|         |         |           |         |            |               |                   | 
         SELECT b1."Id"                                                                                                                                +|         |         |           |         |            |               |                   | 
         FROM library."BaseItems" AS b1                                                                                                                +|         |         |           |         |            |               |                   | 
                                                                                                                                                        |         |         |           |         |            |               |                   | 
 INSERT INTO library."BaseItems" ("Id", "Album", "AlbumArtists", "Artists", "Audio", "ChannelId", "CleanName", "CommunityRating", "CriticRating", "Cust |       1 |    0.39 |      0.39 |    0.39 |       0.39 |             1 |              1.00 | Γ£à FAST
 SELECT b2."Id", b2."Album", b2."AlbumArtists", b2."Artists", b2."Audio", b2."ChannelId", b2."CleanName", b2."CommunityRating", b2."CriticRating", b2." |      25 |    0.16 |      0.31 |    0.07 |       4.02 |             0 |              0.00 | Γ£à FAST
 UPDATE library."BaseItems" AS b                                                                                                                       +|       1 |    0.27 |      0.27 |    0.27 |       0.27 |             1 |              1.00 | Γ£à FAST
 SET "InheritedParentalRatingValue" = $1                                                                                                               +|         |         |           |         |            |               |                   | 
 WHERE b."OfficialRating" IS NULL OR b."OfficialRating" = $2                                                                                            |         |         |           |         |            |               |                   | 
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |       2 |    0.26 |      0.26 |    0.25 |       0.51 |             4 |              2.00 | Γ£à FAST
 SELECT b."Id"                                                                                                                                         +|     337 |    0.05 |      0.25 |    0.02 |      17.83 |           130 |              0.39 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."ParentId" = $1                                                                                                                                |         |         |           |         |            |               |                   | 
 SELECT b."Id"                                                                                                                                         +|       2 |    0.15 |      0.19 |    0.11 |       0.30 |            23 |             11.50 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."ParentId" IN ($1 /*, ... */)                                                                                                                  |         |         |           |         |            |               |                   | 
 UPDATE library."BaseItems" SET "CleanName" = $1                                                                                                       +|       1 |    0.15 |      0.15 |    0.15 |       0.15 |             1 |              1.00 | Γ£à FAST
 WHERE "Id" = $2                                                                                                                                        |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |       1 |    0.11 |      0.11 |    0.11 |       0.11 |             1 |              1.00 | Γ£à FAST
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |       1 |    0.09 |      0.09 |    0.09 |       0.09 |             0 |              0.00 | Γ£à FAST
 UPDATE library."BaseItems" AS b                                                                                                                       +|       1 |    0.08 |      0.08 |    0.08 |       0.08 |             1 |              1.00 | Γ£à FAST
 SET "InheritedParentalRatingSubValue" = $1                                                                                                            +|         |         |           |         |            |               |                   | 
 WHERE b."OfficialRating" IS NULL OR b."OfficialRating" = $2                                                                                            |         |         |           |         |            |               |                   | 
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanName", b0."CommunityRating", b0."CriticRating", b0." |       2 |    0.06 |      0.07 |    0.05 |       0.12 |             0 |              0.00 | Γ£à FAST
 SELECT count(*)::int                                                                                                                                  +|       1 |    0.05 |      0.05 |    0.05 |       0.05 |             1 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Name" IS NOT NULL AND b."Name" <> $1                                                                                                          |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |       1 |    0.05 |      0.05 |    0.05 |       0.05 |             1 |              1.00 | Γ£à FAST
 SELECT b0."Id", b0."ItemId", b."Id"                                                                                                                   +|       2 |    0.04 |      0.04 |    0.03 |       0.07 |             0 |              0.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 INNER JOIN library."BaseItemTrailerTypes" AS b0 ON b."Id" = b0."ItemId"                                                                               +|         |         |           |         |            |               |                   | 
 WHERE b."Id"                                                                                                                                           |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Path"                                                                                                                               +|       2 |    0.03 |      0.04 |    0.02 |       0.06 |             0 |              0.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."MediaType" = $3 AND NOT (b."IsVirtualItem") AND NOT (b."IsFolder")                                                                           +|         |         |           |         |            |               |                   | 
 ORDER BY b."Id"                                                                                                                                       +|         |         |           |         |            |               |                   | 
 LIMI                                                                                                                                                   |         |         |           |         |            |               |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b."CommunityRating", b."CriticRating", b."CustomRati |       1 |    0.03 |      0.03 |    0.03 |       0.03 |             0 |              0.00 | Γ£à FAST
 SELECT count(*)::int                                                                                                                                  +|       1 |    0.03 |      0.03 |    0.03 |       0.03 |             1 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Type" = ANY ($1)                                                                                                                              |         |         |           |         |            |               |                   | 
 SELECT count(*)::int                                                                                                                                  +|       2 |    0.03 |      0.03 |    0.03 |       0.06 |             2 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."MediaType" = $1 AND NOT (b."IsVirtualItem") AND NOT (b."IsFolder")                                                                            |         |         |           |         |            |               |                   | 
 SELECT DISTINCT b."OfficialRating"                                                                                                                    +|       1 |    0.03 |      0.03 |    0.03 |       0.03 |             1 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                          |         |         |           |         |            |               |                   | 
 SELECT count(*)::int                                                                                                                                  +|       1 |    0.03 |      0.03 |    0.03 |       0.03 |             1 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                         +|         |         |           |         |            |               |                   | 
 WHERE b."Type" = $1                                                                                                                                    |         |         |           |         |            |               |                   | 
 SELECT count(*)::int                                                                                                                                  +|       2 |    0.03 |      0.03 |    0.02 |       0.05 |             2 |              1.00 | Γ£à FAST
 FROM library."BaseItems" AS b                                                                                                                          |         |         |           |         |            |               |                   | 
(178 rows)

Time: 70.774 ms

6. PEOPLES AND ITEMVALUES QUERIES
-----------------------------------------
Queries on high-sequential-scan tables

 table_name |                                            query_preview                                             |  calls  | avg_ms  |  max_ms  |  total_ms  | rows_returned 
------------+------------------------------------------------------------------------------------------------------+---------+---------+----------+------------+---------------
 Peoples    | SELECT p."Id", p."Name", p."PersonType"                                                             +|  211825 |    1.16 | 12094.95 |  246756.24 |       1773814
            | FROM library."Peoples" AS p                                                                         +|         |         |          |            | 
            | WHERE EXISTS (                                                                                      +|         |         |          |            | 
            |     SELECT $3                                                                                       +|         |         |          |            | 
            |                                                                                                      |         |         |          |            | 
 ItemValues | SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |     136 |  476.08 |  5457.70 |   64747.39 |         40040
 ItemValues | INSERT INTO library."ItemValuesMap" ("ItemId", "ItemValueId")                                       +| 1235789 |    0.64 |  5333.12 |  790211.42 |       1235789
            | VALUES ($1, $2)                                                                                      |         |         |          |            | 
 ItemValues | DELETE FROM library."ItemValues" AS i                                                               +|     247 |  208.31 |  3835.16 |   51452.50 |          7861
            | WHERE (                                                                                             +|         |         |          |            | 
            |     SELECT count(*)::int                                                                            +|         |         |          |            | 
            |     FROM library."ItemValuesM                                                                        |         |         |          |            | 
 ItemValues | COPY library."ItemValuesMap" ("ItemId", "ItemValueId") TO stdout                                     |       9 |  855.10 |  2592.45 |    7695.94 |       2842224
 ItemValues | SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |      67 |  596.08 |  2529.19 |   39937.50 |          8935
 ItemValues | SELECT b."Id"                                                                                       +|      23 |  400.21 |  1491.93 |    9204.91 |           406
            | FROM library."BaseItems" AS b                                                                       +|         |         |          |            | 
            | WHERE b."Id" IN (                                                                                   +|         |         |          |            | 
            |     SELECT (                                                                                        +|         |         |          |            | 
            |         SELECT b1."Id"                                                                              +|         |         |          |            | 
            |                                                                                                      |         |         |          |            | 
 Peoples    | SELECT p3."ItemId", p3."PeopleId", p3."Role", p3."ListOrder", p3."SortOrder", p."Id"                +|  169702 |    0.42 |  1351.38 |   71078.84 |       1773814
            | FROM library."P                                                                                      |         |         |          |            | 
 Peoples    | CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_peoples_name_lower                                      +|       1 | 1328.31 |  1328.31 |    1328.31 |             0
            | ON library."Peoples" (LOWER("Name"))                                                                +|         |         |          |            | 
            |                                                                                                      |         |         |          |            | 
 ItemValues | SELECT (                                                                                            +|       3 |  717.08 |  1204.75 |    2151.23 |           138
            |     SELECT i5."Value"                                                                               +|         |         |          |            | 
            |     FROM library."ItemValuesMap" AS i2                                                              +|         |         |          |            | 
            |     INNER JOIN library."ItemVa                                                                       |         |         |          |            | 
 ItemValues | DELETE FROM library."ItemValuesMap" AS i                                                            +|       3 |  900.44 |   934.72 |    2701.31 |        820566
            | USING library."ItemValues" AS i0                                                                    +|         |         |          |            | 
            | WHERE i."ItemValueId" = i0                                                                           |         |         |          |            | 
 Peoples    | SELECT p."ItemId", p."PeopleId", p."Role", p."ListOrder", p."SortOrder", p0."Id", p0."Name", p0."Per |  144055 |    0.19 |   745.03 |   27336.83 |        769814
 ItemValues | SELECT b1."Id"                                                                                      +|     170 |   30.92 |   719.17 |    5256.13 |           359
            | FROM (                                                                                              +|         |         |          |            | 
            |     SELECT DISTINCT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio                       |         |         |          |            | 
 Peoples    | INSERT INTO library."Peoples" ("Id", "Name", "PersonType")                                          +|  106492 |    0.14 |   699.66 |   14636.51 |        106492
            | VALUES ($1, $2, $3)                                                                                  |         |         |          |            | 
 ItemValues | SELECT (                                                                                            +|       3 |  401.23 |   635.32 |    1203.68 |            40
            |     SELECT i5."Value"                                                                               +|         |         |          |            | 
            |     FROM library."ItemValuesMap" AS i2                                                              +|         |         |          |            | 
            |     INNER JOIN library."ItemVa                                                                       |         |         |          |            | 
 Peoples    | ANALYZE VERBOSE library."Peoples"                                                                    |       1 |  581.46 |   581.46 |     581.46 |             0
 Peoples    | COPY library."Peoples" ("Id", "Name", "PersonType") TO stdout                                        |       9 |  223.82 |   523.37 |    2014.36 |        867317
 Peoples    | SELECT p."Id", p."Name", p."PersonType"                                                             +|  144055 |   54.79 |   492.43 | 7893097.65 |       1014412
            | FROM library."Peoples" AS p                                                                         +|         |         |          |            | 
            | WHERE p."Name" || $2 || COALESCE                                                                     |         |         |          |            | 
 ItemValues | SELECT b."Id"                                                                                       +|      18 |  314.74 |   486.03 |    5665.24 |           256
            | FROM library."BaseItems" AS b                                                                       +|         |         |          |            | 
            | WHERE b."Id" IN (                                                                                   +|         |         |          |            | 
            |     SELECT (                                                                                        +|         |         |          |            | 
            |         SELECT b1."Id"                                                                              +|         |         |          |            | 
            |                                                                                                      |         |         |          |            | 
 ItemValues | SELECT b."Id"                                                                                       +|       2 |  443.38 |   444.00 |     886.77 |            32
            | FROM library."BaseItems" AS b                                                                       +|         |         |          |            | 
            | WHERE b."Id" IN (                                                                                   +|         |         |          |            | 
            |     SELECT (                                                                                        +|         |         |          |            | 
            |         SELECT b1."Id"                                                                              +|         |         |          |            | 
            |                                                                                                      |         |         |          |            | 
(20 rows)

Time: 64.439 ms

7. EFFICIENT QUERIES (Many rows, fast execution)
-----------------------------------------
These queries return many rows but execute quickly (good indexes!)

                                            query_preview                                             |  calls  | avg_ms | total_rows_returned | avg_rows_per_call | ms_per_row 
------------------------------------------------------------------------------------------------------+---------+--------+---------------------+-------------------+------------
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanNa |   79571 |   9.21 |            10190469 |            128.07 |     0.0719
 SELECT b4."Id", b4."Album", b4."AlbumArtists", b4."Artists", b4."Audio", b4."ChannelId", b4."CleanNa | 2889749 |   0.31 |             5681986 |              1.97 |     0.1587
 SELECT b0."Id", b0."Album", b0."AlbumArtists", b0."Artists", b0."Audio", b0."ChannelId", b0."CleanNa |    7178 |  47.96 |             4516113 |            629.16 |     0.0762
 SELECT i."ItemValueId", i."CleanValue", i."Type", i."Value"                                         +|  504947 |   4.60 |             2994718 |              5.93 |     0.7752
 FROM library."ItemValues" AS i                                                                      +|         |        |                     |                   | 
 WHERE i."                                                                                            |         |        |                     |                   | 
 SELECT b."Id", b."Album", b."AlbumArtists", b."Artists", b."Audio", b."ChannelId", b."CleanName", b. |    3801 |  37.51 |             2053236 |            540.18 |     0.0694
 SELECT b."Id"                                                                                       +|  799069 |   0.07 |             1831964 |              2.29 |     0.0304
 FROM library."BaseItems" AS b                                                                       +|         |        |                     |                   | 
 WHERE b."Id" = ANY ($1)                                                                              |         |        |                     |                   | 
 SELECT i."ItemValueId", i."ItemId"                                                                  +|  504945 |   0.10 |             1777840 |              3.52 |     0.0294
 FROM library."ItemValuesMap" AS i                                                                   +|         |        |                     |                   | 
 WHERE i."ItemId" = ANY ($1)                                                                          |         |        |                     |                   | 
 SELECT p3."ItemId", p3."PeopleId", p3."Role", p3."ListOrder", p3."SortOrder", p."Id"                +|  169702 |   0.42 |             1773814 |             10.45 |     0.0401
 FROM library."P                                                                                      |         |        |                     |                   | 
 SELECT p."Id", p."Name", p."PersonType"                                                             +|  211825 |   1.16 |             1773814 |              8.37 |     0.1391
 FROM library."Peoples" AS p                                                                         +|         |        |                     |                   | 
 WHERE EXISTS (                                                                                      +|         |        |                     |                   | 
     SELECT $3                                                                                       +|         |        |                     |                   | 
                                                                                                      |         |        |                     |                   | 
 SELECT a."ItemId", a."ParentItemId"                                                                 +|  294112 |   0.09 |             1244536 |              4.23 |     0.0216
 FROM library."AncestorIds" AS a                                                                     +|         |        |                     |                   | 
 WHERE a."ItemId" = $1                                                                                |         |        |                     |                   | 
(10 rows)

Time: 29.483 ms

8. CURRENTLY RUNNING QUERIES
-----------------------------------------
 pid | usename | application_name | duration | state | wait_event_type | wait_event | query_preview 
-----+---------+------------------+----------+-------+-----------------+------------+---------------
(0 rows)

Time: 7.223 ms

9. OVERALL QUERY STATISTICS SUMMARY
-----------------------------------------
 total_unique_queries | total_calls | total_exec_minutes | avg_query_time_ms | slowest_query_ever_ms | slowest_query_ever_seconds | total_rows_returned | avg_rows_per_query 
----------------------+-------------+--------------------+-------------------+-----------------------+----------------------------+---------------------+--------------------
                  576 |    22953301 |             373.36 |            195.33 |             110048.00 |                     110.05 |            83798488 |            5315.92
(1 row)

Time: 39.376 ms


=========================================
RECOMMENDATIONS
=========================================

Based on the analysis above:

1. CRITICAL QUERIES (>100s):
   - Review queries marked ≡ƒöÑ CRITICAL
   - Check EXPLAIN ANALYZE for these queries
   - Consider query rewrite or additional indexes

2. SLOW QUERIES (>10s):
   - Review queries marked ΓÜá∩╕Å SLOW
   - Check if indexes are being used
   - Run: EXPLAIN (ANALYZE, BUFFERS) <query>

3. HIGH TOTAL TIME QUERIES:
   - Even fast queries with many calls add up
   - Consider caching frequently called queries
   - Optimize connection pooling

4. TO RESET STATISTICS:
   Run: SELECT pg_stat_statements_reset();
   (Useful after making optimization changes)

5. TO GET FULL QUERY TEXT:
   This script shows only first 100-150 characters
   Query full text from pg_stat_statements table directly

=========================================
