1 121 2801 23 2778 SQL-launchpad-main-slave SELECT LibraryFileContent.datecreated, LibraryFileContent.filesize, LibraryFileContent.id, LibraryFileContent.md5, LibraryFileContent.sha1 FROM LibraryFileContent WHERE LibraryFileContent.id = %s LIMIT 1
Death-by-1000 queries : doing one query for these things will help a lot. Figuring out why its being queried for may allow avoiding it entirely.
My WAG: we're checking for deleted content:
=== modified file 'lib/canonical/launchpad/database/librarian.py' --- lib/canonical/launchpad/database/librarian.py 2010-09-06 21:02:44 +0000 +++ lib/canonical/launchpad/database/librarian.py 2010-09-10 00:28:16 +0000 @@ -236,7 +236,7 @@
@property def deleted(self): - return self.content is None + return self.contentID is None
I'll put up a branch in a minute for this.
1 121 2801 23 2778 SQL-launchpad- main-slave SELECT ent.datecreated , LibraryFileCont ent.filesize, ent.id, LibraryFileCont ent.md5, LibraryFileCont ent.sha1 ent.id = %s LIMIT 1
LibraryFileCont
LibraryFileCont
FROM LibraryFileContent WHERE LibraryFileCont
Death-by-1000 queries : doing one query for these things will help a
lot. Figuring out why its being queried for may allow avoiding it
entirely.
My WAG: we're checking for deleted content:
=== modified file 'lib/canonical/ launchpad/ database/ librarian. py' launchpad/ database/ librarian. py 2010-09-06 launchpad/ database/ librarian. py 2010-09-10
--- lib/canonical/
21:02:44 +0000
+++ lib/canonical/
00:28:16 +0000
@@ -236,7 +236,7 @@
@property
def deleted(self):
- return self.content is None
+ return self.contentID is None
I'll put up a branch in a minute for this.