Dynamic Columns
Dynamic Columns
Dynamic Columns
MariaDB
Dynamic Columns
lookup
● Slow performance (if database is not optimized for this)
row.
● You can access columns in the server or retrieve the full
values.
● True indexes for dynamic columns is planned for later.
● double
● time
● date
● datetime
Creating/initializing a dynamic_column:
COLUMN_DELETE(string, column_nr1,
column_nr2, ...);
COLUMN_EXISTS(string, column_nr);
SELECT
ID, Type_id, Price, Country_id, Manufacturer_id from item
where COLUMN_EXISTS(extra, 3);
COLUMN_LIST(string);
SELECT COLUMN_LIST(extra) FROM item WHERE id=1;
→ “1,2”
Header:
<flag><number_of_columns>
Sorted index:
<column_nr1><offset/type><column_nr2><offset/type>
Each column is stored as:
<data1><data2>
0 → 0
-1 → 1
1 → 2
-2 → 3
2 → 4
...
● Double, date, time, and date time are fixed-size fields
● String stores collation number and the string
HBase
Q&A