Based on analysis of https://control.siteops.geek.net/sog/trac/ticket/18779
- AppConfig needs a compound index on (options.mount_point, project_id)
- AppConfig needs an index on project_id
- Project needs a compound index on (deleted, shortname, neighborhood_id)
Diff:
forge:tv/2530
Timothy Van Steenburgh: can i get a quick code review on this? https://engr.geek.net/git/?p=forge.git;a=commitdiff;h=fa7a9b825d8794fdf972c087093554fe23254299
David Brondsema: do you know what query uses 'deleted', 'shortname', 'neighborhood_id' ?
Timothy Van Steenburgh: 1s
Timothy Van Steenburgh: dave: the projects macro looks like the most likely suspect
Timothy Van Steenburgh: although it's not doing an explicit count, so i'm not sure if that jives with the log output: Wed Jul 27 00:55:10 [conn164814] query pyforge.$cmd ntoreturn:1 command: { count: "project", query: { deleted: false, shortname: { $ne: "--init--" }, neighborhood_id: ObjectId('4be2faf8898e33156f00003e') }, fields: null } reslen:64 1069ms
David Brondsema: tvansteenburgh: looks like there are a few places similar to that
David Brondsema: Allura/allura/controllers/root.py +82
David Brondsema: Allura/allura/controllers/project.py +101
David Brondsema: all listing projects
David Brondsema: anyway, commit looks great
Merged to dev.