← Back to team overview

launchpad-dev team mailing list archive

Re: UI simplification to "fix" a timeout

 

> 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.


References