Comment 1 for bug 739070

Revision history for this message
Robert Collins (lifeless) wrote : Re: Archive:+repository-size timeout

Hot

 explain analyze SELECT DISTINCT LibraryFileContent.datecreated,
                LibraryFileContent.filesize,
                LibraryFileContent.id,
                LibraryFileContent.md5,
                LibraryFileContent.sha1
FROM BinaryPackageFile,
     BinaryPackagePublishingHistory,
     LibraryFileAlias,
     LibraryFileContent
WHERE BinaryPackagePublishingHistory.archive = 14516
  AND BinaryPackagePublishingHistory.dateremoved IS NULL
  AND BinaryPackagePublishingHistory.binarypackagerelease = BinaryPackageFile.binarypackagerelease
  AND BinaryPackageFile.libraryfile = LibraryFileAlias.id
  AND LibraryFileAlias.content = LibraryFileContent.id;
                                                                                                          QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 HashAggregate (cost=32489.87..32504.58 rows=1471 width=94) (actual time=125.946..126.417 rows=596 loops=1)
   -> Nested Loop (cost=0.00..32471.48 rows=1471 width=94) (actual time=0.780..119.488 rows=1664 loops=1)
         -> Nested Loop (cost=0.00..29693.36 rows=1891 width=4) (actual time=0.597..91.107 rows=1664 loops=1)
               -> Nested Loop (cost=0.00..25785.40 rows=1891 width=4) (actual time=0.438..57.097 rows=1664 loops=1)
                     -> Index Scan using securebinarypackagepublishinghistory__archive__status__idx on binarypackagepublishinghistory (cost=0.00..13471.19 rows=1891 width=4) (actual time=0.209..35.282 rows=1664 loops=1)
                           Index Cond: (archive = 14516)
                           Filter: (dateremoved IS NULL)
                     -> Index Scan using binarypackagefile_binarypackage_idx on binarypackagefile (cost=0.00..6.50 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=1664)
                           Index Cond: (binarypackagefile.binarypackagerelease = binarypackagepublishinghistory.binarypackagerelease)
               -> Index Scan using libraryfilealias_pkey on libraryfilealias (cost=0.00..2.05 rows=1 width=8) (actual time=0.018..0.019 rows=1 loops=1664)
                     Index Cond: (libraryfilealias.id = binarypackagefile.libraryfile)
         -> Index Scan using libraryfilecontent_pkey on libraryfilecontent (cost=0.00..1.46 rows=1 width=94) (actual time=0.014..0.015 rows=1 loops=1664)
               Index Cond: (libraryfilecontent.id = libraryfilealias.content)
 Total runtime: 126.734 ms
(14 rows)

Time: 133.656 ms