https://bugzilla.wikimedia.org/show_bug.cgi?id=8130





--- Comment #9 from Roan Kattouw <roan.katt...@gmail.com>  2009-04-27 13:32:00 
UTC ---
(In reply to comment #8)
> Created an attachment (id=6062)
 --> (https://bugzilla.wikimedia.org/attachment.cgi?id=6062) [details]
> Add/implement MWNamespace::getContentNamespaces(), patch for querypage-work
> branch
> 
> Here's a new patch, written specifically for the querypage-work branch.
Thanks, committed in r49951.

> The
> new function is now MWNamespace::getContentNamespaces().  I went ahead and
> added it to every query where I think it should be used.  In the process, I
> took a stab at converting SpecialPopularPages over to the new syntax.
> 
Thanks; I thought I had converted all of them, but I seem to have missed that
one somehow.

> In terms of efficiency, using getContentNamespaces() instead of just NS_MAIN
> shouldn't have any impact on wikipedia, because the two end up producing
> identical SQL.  And as someone who uses a wiki where the content namespaces
> have been customized, I'd argue getContentNamespaces() needs to be used in all
> possible queries -- because otherwise the corresponding special page ends up
> being completely useless.  If performance really is a limiting factors in some
> of these queries, it might make more sense to just drop the namespace 
> condition
> completely (or at least drop it if the content namespaces have been
> customized).
> 
True. In all of the queries you modified, it looks like the WHERE clause for
page_namespace is not indexed anyway, so whether it limits to one or more
values doesn't matter.

> There are a couple of other minor fixes included in the patch that I came
> across while doing a quick test-run of the code; I left them in place because
> it seemed likely you'd want to make those fixes eventually.  (Specifically,
> abstract-ing PageQueryPage, fixing a missing ' in SpecialDeadendpages)
> 
Good catch.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to