r87122 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87121‎ | r87122 | r87123 >
Date:13:42, 29 April 2011
Author:greg
Status:ok
Tags:
Comment:
Per discussion on Mediawiki-l, talk about the GROUP BY issue a bit.
Modified paths:
  • /trunk/phase3/docs/database.txt (modified) (history)
  • /trunk/phase3/docs/databases/postgres.txt (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/database.txt
@@ -186,3 +186,14 @@
187187 More information can be found about each of these databases (known issues,
188188 level of support, extra configuration) in the "databases" subdirectory in
189189 this folder.
 190+
 191+------------------------------------------------------------------------
 192+ Use of GROUP BY
 193+------------------------------------------------------------------------
 194+
 195+MySQL supports GROUP BY without checking anything in the SELECT clause.
 196+Other DBMSs (especially Postgres) are stricter and require that all the
 197+non-aggregate items in the SELECT clause appear in the GROUP BY. For
 198+this reason, it is highly discouraged to use SELECT * with GROUP BY
 199+queries.
 200+
Index: trunk/phase3/docs/databases/postgres.txt
@@ -92,6 +92,18 @@
9393 format it expects things to be in. :)
9494
9595
 96+== MySQL differences ==
 97+
 98+The major differences between MySQL and Postgres are represented as
 99+methods in the Database class. For example, implicitGroupby() is
 100+true for MySQL and false for Postgres. This means that in those
 101+places where the code does not add all the non-aggregate items
 102+from the SELECT clause to the GROUP BY, we can add them in, but in
 103+a conditional manner with the above method, as simply adding them
 104+all in to the main query may cause performance problems with
 105+MySQL.
 106+
 107+
96108 == Getting help ==
97109
98110 In addition to the normal venues (MediaWiki mailing lists

Status & tagging log