Per discussion on Mediawiki-l, talk about the GROUP BY issue a bit.
This commit is contained in:
parent
00086d1ddd
commit
c9f12ba553
2 changed files with 23 additions and 0 deletions
|
|
@ -186,3 +186,14 @@ MediaWiki does support the following other DBMSs to varying degrees.
|
|||
More information can be found about each of these databases (known issues,
|
||||
level of support, extra configuration) in the "databases" subdirectory in
|
||||
this folder.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
Use of GROUP BY
|
||||
------------------------------------------------------------------------
|
||||
|
||||
MySQL supports GROUP BY without checking anything in the SELECT clause.
|
||||
Other DBMSs (especially Postgres) are stricter and require that all the
|
||||
non-aggregate items in the SELECT clause appear in the GROUP BY. For
|
||||
this reason, it is highly discouraged to use SELECT * with GROUP BY
|
||||
queries.
|
||||
|
||||
|
|
|
|||
|
|
@ -92,6 +92,18 @@ in maintenance/tables.sql itself, as it is very strict in the
|
|||
format it expects things to be in. :)
|
||||
|
||||
|
||||
== MySQL differences ==
|
||||
|
||||
The major differences between MySQL and Postgres are represented as
|
||||
methods in the Database class. For example, implicitGroupby() is
|
||||
true for MySQL and false for Postgres. This means that in those
|
||||
places where the code does not add all the non-aggregate items
|
||||
from the SELECT clause to the GROUP BY, we can add them in, but in
|
||||
a conditional manner with the above method, as simply adding them
|
||||
all in to the main query may cause performance problems with
|
||||
MySQL.
|
||||
|
||||
|
||||
== Getting help ==
|
||||
|
||||
In addition to the normal venues (MediaWiki mailing lists
|
||||
|
|
|
|||
Loading…
Reference in a new issue