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
Hot
explain analyze SELECT DISTINCT LibraryFileCont ent.datecreated ,
LibraryFileCo ntent.filesize,
LibraryFileCo ntent.id,
LibraryFileCo ntent.md5,
LibraryFileCo ntent.sha1 agePublishingHi story, eAlias, eContent blishingHistory .archive = 14516 blishingHistory .dateremoved IS NULL blishingHistory .binarypackager elease = BinaryPackageFi le.binarypackag erelease le.libraryfile = LibraryFileAlias.id s.content = LibraryFileCont ent.id;
QUERY PLAN ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ----- 87..32504. 58 rows=1471 width=94) (actual time=125. 946..126. 417 rows=596 loops=1) 00..32471. 48 rows=1471 width=94) (actual time=0.780..119.488 rows=1664 loops=1) 00..29693. 36 rows=1891 width=4) (actual time=0.597..91.107 rows=1664 loops=1) 00..25785. 40 rows=1891 width=4) (actual time=0.438..57.097 rows=1664 loops=1)
-> Index Scan using securebinarypac kagepublishingh istory_ _archive_ _status_ _idx on binarypackagepu blishinghistory (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 binarypackagefi le_binarypackag e_idx on binarypackagefile (cost=0.00..6.50 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=1664)
Index Cond: (binarypackagef ile.binarypacka gerelease = binarypackagepu blishinghistory .binarypackager elease) s_pkey on libraryfilealias (cost=0.00..2.05 rows=1 width=8) (actual time=0.018..0.019 rows=1 loops=1664)
Index Cond: (libraryfileali as.id = binarypackagefi le.libraryfile) ent_pkey on libraryfilecontent (cost=0.00..1.46 rows=1 width=94) (actual time=0.014..0.015 rows=1 loops=1664)
Index Cond: (libraryfilecon tent.id = libraryfilealia s.content)
FROM BinaryPackageFile,
BinaryPack
LibraryFil
LibraryFil
WHERE BinaryPackagePu
AND BinaryPackagePu
AND BinaryPackagePu
AND BinaryPackageFi
AND LibraryFileAlia
-------
HashAggregate (cost=32489.
-> Nested Loop (cost=0.
-> Nested Loop (cost=0.
-> Nested Loop (cost=0.
-> Index Scan using libraryfilealia
-> Index Scan using libraryfilecont
Total runtime: 126.734 ms
(14 rows)
Time: 133.656 ms