[MCOL-406] Stored procedures required for I_S tables Created: 2016-11-15 Updated: 2016-12-07 Resolved: 2016-12-07 |
|
| Status: | Closed |
| Project: | MariaDB ColumnStore |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.6 |
| Type: | New Feature | Priority: | Major |
| Reporter: | Andrew Hutchings (Inactive) | Assignee: | Daniel Lee (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 2016-22, 2016-23, 2016-24 | ||||||||
| Description |
|
Stored procedures are required for the new I_S tables created in 1. a full disk size report We need somewhere to put these as I_S cannot have stored procedures. I recommend something new such as columnstoresys so that it doesn't have any of the legacy names our other schemas use. |
| Comments |
| Comment by Andrew Hutchings (Inactive) [ 2016-11-15 ] | ||||||||
|
My initial query was wrong for a number of reasons. Most of these down to one join's results skewing the other join. These are the three queries: Extent file sizes:
Dict file sizes:
Total file sizes:
| ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-11-15 ] | ||||||||
|
Things to note:
| ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-11-15 ] | ||||||||
|
Total data size:
Need to use this to work out estimated compression ratio | ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-11-15 ] | ||||||||
|
also requested for this feature: a shell wrapper script | ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-11-21 ] | ||||||||
|
Compression ratio (for compressed tables):
Not quite right, need mac(block_offset) | ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-11-23 ] | ||||||||
|
New patch does the following:
Done everything apart from a script to access it. Getting a script to work if a MySQL password is changed could be difficult and it should be easy to access the stored procedures. Moving to stalled until tree is unfrozen | ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-11-24 ] | ||||||||
|
Documentation updates to follow after merge | ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-11-28 ] | ||||||||
|
Documentation draft available at: https://mariadb.com/kb/en/mariadb/columnstore-information-schema-tables/+r/50150/ | ||||||||
| Comment by Daniel Lee (Inactive) [ 2016-12-02 ] | ||||||||
|
Build tested: Source from Github. [root@localhost mariadb-columnstore-server]# git show Merge pull request #18 from mariadb-corporation/ [root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/ merge mcol-421 branch It is nicely implemented and the information that it provides is very useful. The following are few issues that I found: 1) The documentation says this: The table_usage() procedure gives a the total data disk usage, dictionary disk usage and grand total disk usage per-table. It can be called one of two ways, the first gives a total for each table: > call columnstore_info.table_usage(); Or for a specific table, my_table in this example: > call columnstore_info.table_usage('my_table'); 2)
-----------
----------- The lineitem table exist in different schemas. How do I specify a schema to identify a specific table. Is this usage for all lineitem tables? 3) mysqld crashed when calling the table_usage() procedure, but I could not reproduce it after. MariaDB [tpch1c]> call columnstore_info.table_usage('tpch10c.lineitem'); Info from the /var/log/mariadb/mariadb.log file 161202 22:14:34 [ERROR] mysqld got signal 11 ; To report this bug, see https://mariadb.com/kb/en/reporting-bugs We will try our best to scrape up some info that will hopefully help Server version: 10.1.19-MariaDB Thread pointer: 0x0x7f1de1a90908 Trying to get some variables. Optimizer switch: index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=on,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=off,table_elimination=off,extended_keys=off,exists_to_in=on,orderby_uses_equalities=off The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains We think the query pointer is invalid, but we will try to print it anyway. 161202 22:14:35 mysqld_safe Number of processes running now: 0 | ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-12-03 ] | ||||||||
|
For point 1, it is supposed to be "call columnstore_info.table_usage(NULL);". For the rest, I'll look into this early next week. | ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-12-05 ] | ||||||||
|
Segfault was very likely to be | ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-12-06 ] | ||||||||
|
Review for fixes based on Daniel's comments. To answer the specific problems: 1) A 'NULL' needs to be provided for the parameter since optional parameters are not possible. I will make sure to update the documentation appropriately 2) Which you can only use the table name in the query (schema.table format won't work) with the latest pull request it will give the results broken down by schema and table. 3) I'm pretty sure | ||||||||
| Comment by David Thompson (Inactive) [ 2016-12-06 ] | ||||||||
|
Agreed, lets go forward with justins suggestion for 1.0.6. | ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-12-06 ] | ||||||||
|
Another pull request implemented the discussed change to table_usage() | ||||||||
| Comment by Andrew Hutchings (Inactive) [ 2016-12-07 ] | ||||||||
|
Another new pull request, fixes the table_usage('schema', NULL) use case and the hang dleeyh experienced. | ||||||||
| Comment by Daniel Lee (Inactive) [ 2016-12-07 ] | ||||||||
|
Build verified: Github source [root@localhost mariadb-columnstore-server]# git show Merge pull request #20 from mariadb-corporation/ [root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/ Merge pull request #73 from mariadb-corporation/ Mcol 435 Verified the two fixes. |