On Wed, Jul 21, 2010 at 05:00:43PM -0400, Aryeh Gregor wrote:
2) We have no way to efficiently get all items that are in a category
and also in a particular namespace. Particularly, we can't retrieve
all subcategories without scanning all items in the category, which is
inefficient when we have a few (or no) subcategories and tons of
items. (This is bugs 1211, 23682, and 450.)
"Categorymembers namespace filtering is inefficient, uses ugly hack in
miser mode",
https://bugzilla.wikimedia.org/show_bug.cgi?id=19640 , is
also very related.
I think the goal for (2) should be to allow efficient
separate
retrieval of subcategories, files, and other pages, but not to
distinguish between namespaces otherwise.
That wouldn't work if you did want to also fix bug 19640. It is quite
plausible that a bot might want to query all ns0 pages in a category, or
all talk pages, or all non-talk pages, or all templates, etc.