Index: trunk/phase3/docs/database.txt |
— | — | @@ -186,3 +186,14 @@ |
187 | 187 | More information can be found about each of these databases (known issues, |
188 | 188 | level of support, extra configuration) in the "databases" subdirectory in |
189 | 189 | 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 @@ |
93 | 93 | format it expects things to be in. :) |
94 | 94 | |
95 | 95 | |
| 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 | + |
96 | 108 | == Getting help == |
97 | 109 | |
98 | 110 | In addition to the normal venues (MediaWiki mailing lists |