2009/3/20 <jidanni(a)jidanni.org>rg>:
All I know is there should be a way to do a SELECT on
table wiki_page
WHERE the page_namespaces are in, or not in, a list we give
There's no efficient way to write such a SQL query.
Please read again the paragraph Roan wrote you:
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
first 10.
It specifically answers your question, explaining why it is not possible.
If you want to read more about the technical reasons for this, please
head for
http://dev.mysql.com/doc/refman/5.0/en/order-by-optimization.html
and
http://s.petrunia.net/blog/?p=24 , look for "filesort" keyword.
The API limitations you mention were not put here because some devs
thought that it would look nicer, or because it was easier to write
code for this at a certain time. These limitations are here, because
of the way the underlying data is ordered in the database.
--
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]