| 396 | | |
| 397 | | |
| 398 | | |
| 399 | | |
| | 396 | ==== Row format експерименти |
| | 397 | |
| | 398 | {{{ |
| | 399 | CREATE TABLE test_row_format_base AS |
| | 400 | SELECT |
| | 401 | flight_id, |
| | 402 | airline_id, |
| | 403 | flightno AS flight_number, |
| | 404 | `from` AS departure_airport, |
| | 405 | `to` AS arrival_airport, |
| | 406 | departure AS departure_time, |
| | 407 | arrival AS arrival_time, |
| | 408 | REPEAT('X', 500) AS dummy_data |
| | 409 | FROM flight |
| | 410 | LIMIT 10000; |
| | 411 | |
| | 412 | -- Test 1: DYNAMIC |
| | 413 | CREATE TABLE test_dynamic |
| | 414 | ROW_FORMAT=DYNAMIC |
| | 415 | AS SELECT * FROM test_row_format_base; |
| | 416 | |
| | 417 | -- Test 2: COMPACT |
| | 418 | CREATE TABLE test_compact |
| | 419 | ROW_FORMAT=COMPACT |
| | 420 | AS SELECT * FROM test_row_format_base; |
| | 421 | |
| | 422 | -- Test 3: COMPRESSED (со различни compression levels) |
| | 423 | CREATE TABLE test_compressed_1 |
| | 424 | ROW_FORMAT=COMPRESSED |
| | 425 | KEY_BLOCK_SIZE=8 |
| | 426 | AS SELECT * FROM test_row_format_base; |
| | 427 | |
| | 428 | CREATE TABLE test_compressed_2 |
| | 429 | ROW_FORMAT=COMPRESSED |
| | 430 | KEY_BLOCK_SIZE=4 |
| | 431 | AS SELECT * FROM test_row_format_base; |
| | 432 | }}} |