MariaDB: 新兴的开源大数据引擎 - this presentation was translated into Chinese by Ni Yan of Nexedi. It was presented in Beijing, China at the Police Big Data Conference.
26. 角色
•捆绑用户到一起 , 用类似的特权 - 依照 SQL 标准
CREATE ROLE audit_bean_counters;
GRANT SELECT ON accounts.* to
audit_bean_counters;
GRANT audit_bean_counters to ceo;
MariaDB 10.0+
Not in 5.6; can assist in migrations from SQL Server/Oracle if its used
PERSISTENT is like a materialized view to some extent
PERSISTENT columns can be used in secondary indexes
When INSERTing, you cannot leave out the virtual column from the list, and you cannot supply a value either - so use default
You can now select the price in USD, and that column is computed on the fly, and you never need to know that the official price is fixed. However, you don’t do this in practice - computational logic should stay out of the database, in your app - db just for storage
Perl Compatible Regular Expressions
recursive patterns, named capture, look-ahead and look-behind assertions, non-capturing groups, non-greedy quantifiers, Unicode character properties, extended syntax for characters and character classes, multi-line matching
East asian: big5, gbk, euckr, etc. mysql/previous mariadb is just 8-bit character sets
Define & redefine number of columns + data types on a row-by-row basis w/o altering table config.
max total length of packed dynamic column blob: 1gb (max_allowed_packet)
use case: using myisam? port.
use case: sphinx does sort, filtering, slicing of result; so you don’t need to use WHERE, ORDER BY, LIMIT <- sphinx is optimised better for this
configuring sphinx is something you have to do, run it on another machine
Install it
join_cache_level=7 in my.cnf (join_cache_hashed is on in 10)
Use cassandra 1.x, not 2.x - data model changes, authentication also (1.2 tested)
OLTP not the target here
indexing: reading from file system, OS, or another database
engine_condition_pushdown = on (off by default)
Many active threads are a performance killer, because increasing the number of threads leads to extensive context switching, bad locality for CPU caches, and increased contention for hot locks.
Enable thread-pool (on Windows on by default). SHOW GLOBAL VARIABLES LIKE '%thread_pool%';
Limit the resources uses by threads (thread_pool_max_threads)
We’re porting thread_pool_high_prio_mode=transactions (default) | statements from Percona Server
works with mysql
we also changed mytop to show progress reporting when you do an alter table or load data infile
The server counts the number of read, inserted, modified, and deleted rows during query execution. This takes into account the use of temporary tables, and sorting for intermediate query operations.
Once the counter exceeds the value specified in the LIMIT ROWS EXAMINED clause, query execution is terminated as soon as possible.
Results may be incomplete
Works for everything except a connection served by the query_cache - since no tables are opened
Works with the binlog, possible to obtain the binlog position corresponding to a transactional snapshot of the database without blocking any other queries. - to provision a new slave