summaryrefslogtreecommitdiff
path: root/Docs/manual.texi
diff options
context:
space:
mode:
Diffstat (limited to 'Docs/manual.texi')
-rw-r--r--Docs/manual.texi136
1 files changed, 136 insertions, 0 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index 83531aaab47..96a1d70ffef 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -49259,6 +49259,12 @@ New client-server protocol for 4.0
@item
Multi-table @code{DELETE}/@code{UPDATE}
@item
+derived tables
+@item
+user resources management
+@item
+OLAP functionality
+@item
The @code{MySQLGUI} client.
@item
Maintainer of @code{MySQL++}.
@@ -49689,8 +49695,138 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@item
Fixed a bug that made the pager option in the mysql client non-functional.
@end itemize
+@item
+Added OLAP functionality.
+
+Arjen , please add the following text somewhere appropriate in the
+text above:
+
+-------------------------------------------------------------------------
+
+Documentation for OLAP extension
+
+Introduction
+------------
+
+MySQL will first support CUBE and ROLLUP operators from entire OLAP
+functionality.
+
+The CUBE and ROLLUP extensions to SQL make querying and reporting
+easier in data warehousing environments. ROLLUP creates subtotals at
+increasing levels of aggregation, from the most detailed up to a grand
+total. CUBE is an extension similar to ROLLUP, enabling a single
+statement to calculate all possible combinations of subtotals.
+Syntax:
+------
+
+The syntax supported by the enhanced mysql for CUBE and ROLLUP
+operators.
+
+CUBE
+----
+
+SELECT field1, field2, ... AGGR(fieldn) FROM
+table GROUP BY field1, field2 field(n-1) WITH CUBE
+
+This would generate the aggregates with group bys of all the
+combinations of dimensions.
+
+ROLLUP:
+-----
+
+ SELECT field1, field2, ... AGGR(fieldn) FROM table
+ GROUP BY field1, field2 field(n-1) WITH ROLLUP
+
+Example:
+-------
+
+mysql> select * from sales;
++------------+---------------+------+--------+
+| product | country | year | profit |
++------------+---------------+------+--------+
+| Computer | India | 2000 | 1200 |
+| TV | United States | 1999 | 150 |
+| Calculator | United States | 1999 | 50 |
+| Computer | United States | 1999 | 1500 |
+| Computer | United States | 2000 | 1500 |
+| TV | United States | 2000 | 150 |
+| TV | India | 2000 | 100 |
+| TV | India | 2000 | 100 |
+| Calculator | United States | 2000 | 75 |
+| Calculator | India | 2000 | 75 |
+| TV | India | 1999 | 100 |
+| Computer | India | 1999 | 1200 |
+| Computer | United States | 2000 | 1500 |
+| Calculator | United States | 2000 | 75 |
++------------+---------------+------+--------+
+14 rows in set (0.00 sec)
+
+
+
+mysql> Select sales.product, sales.country , sales.year, sum(profit) from
+sales group by product, country, year with cube;
+
++------------+---------------+------+-------------+
+| product | country | year | sum(profit) |
++------------+---------------+------+-------------+
+| Calculator | India | 2000 | 75 |
+| Calculator | United States | 1999 | 50 |
+| Calculator | United States | 2000 | 150 |
+| Computer | India | 1999 | 1200 |
+| Computer | India | 2000 | 1200 |
+| Computer | United States | 1999 | 1500 |
+| Computer | United States | 2000 | 3000 |
+| TV | India | 1999 | 100 |
+| TV | India | 2000 | 200 |
+| TV | United States | 1999 | 150 |
+| TV | United States | 2000 | 150 |
+| ALL | India | 1999 | 1300 |
+| ALL | India | 2000 | 1475 |
+| ALL | United States | 1999 | 1700 |
+| ALL | United States | 2000 | 3300 |
+| Calculator | ALL | 1999 | 50 |
+| Calculator | ALL | 2000 | 225 |
+| Computer | ALL | 1999 | 2700 |
+| Computer | ALL | 2000 | 4200 |
+| TV | ALL | 1999 | 250 |
+| TV | ALL | 2000 | 350 |
+| Calculator | India | ALL | 75 |
+| Calculator | United States | ALL | 200 |
+| Computer | India | ALL | 2400 |
+| Computer | United States | ALL | 4500 |
+| TV | India | ALL | 300 |
+| TV | United States | ALL | 300 |
+| ALL | ALL | 1999 | 3000 |
+| ALL | ALL | 2000 | 4775 |
+| ALL | India | ALL | 2775 |
+| ALL | United States | ALL | 5000 |
+| Calculator | ALL | ALL | 275 |
+| Computer | ALL | ALL | 6900 |
+| TV | ALL | ALL | 600 |
+| ALL | ALL | ALL | 7775 |
++------------+---------------+------+-------------+
+35 rows in set (0.00 sec)
+
+
+MySQL supports now CUBE and ROLLUP extensions, with all functions
+that one wishes to use with them.
+
+Those extensions already work in all tested combinations. They work
+with UNION's, should work with sub-selects in 4.1 and derived tables.
+
+TODO
+----
+
+For the moment, ORDER and LIMIT are disabled for CUBE and ROLLUP. This
+however remains to be added later.
+
+Another feature that has to be added later is grouping of select list
+itmes in order to alleviate user errors. For the moment, missing
+(hidden) columns are not used at all.
+-------------------------------------------------------------------------
+
@node News-4.0.2, News-4.0.1, News-4.0.3, News-4.0.x
@appendixsubsec Changes in release 4.0.2 (01 July 2002)