> My point is that I agree capping it at a 'reasonable' value seems > worthy, but how do you detect that the cap is exceeded without > actually doing the query?
That's a good point but: a) if we decide to display the simplified menu we avoid doing *several* heavy queries; b) my idea was to do a simplified (heuristical) query to check that the number of branches is huge, not the rather complex count query which counts the number of public branches plus the number of private branches that the teams you're in allow you to see (even if, like I said, the complexity comes from the number of public branches). Also, I was (maybe naively) hoping that if the query is something like "select … count(*) > 10000 …", postgresql would optimise it to stop the table exploration as soon as more than 10000 rows are fetched, hence reducing the cost of the scan. R. _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : launchpad-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp