> I notice an artificial restriction in the API, the inability to do
> certain operations across more than one namespace.
> One should not only be able to say a query should be for e.g., namespace 1,
> but also 1,2,3, and even "all".
> I can think of several usage cases:
> * What page name start with the letter K, in all namespaces?
> * What pages are ....., in all namespaces?
> * What are the names of the pages, in all namespaces? (so I can use
> them as a generator for &export.)
> Maybe the restriction
> apnamespace: The namespace to enumerate. You can only enumerate
> one namespace at a time.
> was made with Wikipedia in mind. But now with the default limits in
> place, there is no need force this restriction on smaller sites, no?
No, this isn't related to limits. Due to the way the database works,
certain queries can efficiently sort their results using an index, while
other queries can't, either because there's no index for them or because
making an index for it is impossible. Combining apnamespace with
apprefix results in a query of the third category, which means it'll
sort slow no matter how many rows are requested.
This of the database as a phone book, sorted by town first, then by last
name. If you wanted to list the first 10 people whose last names start
with a "B" in a certain town (sorted by last name of course), that'd be
easy (and wouldn't depend on how many Bs there are in that town), while
listing all Bs regardless of town would be a lot harder because you'd
have to make a list of all Bs in all towns, then sort that and take the
In any case, if you there are too many pages that you
parse the full page list - then it is unlikely that being able to
specify multiple namespaces will save you any requests anyway.
Yes, this is true. For namespaces with more than 500/5000 pages, you're
not saving any requests.
Roan Kattouw (Catrope)