<  *  | *** >

Others 

  • reduce memory and disk usage
  • need to force a value during an insert
  • function sb_export
  • set_text/set_sparse_text
  • show table statistics (work in progress)
  • allow errors in select
  • sb_parallel
  • fn_compute_info / fn_smart_delete (beta)
  • set_dirty
  • backup
  • dates
  • SB tags
  • index vs no_index read
  • countsequence
  • hide data from memory
  • countdistinct & high sparsity
  • number format/precision

Others

reduce memory and disk usage

Use QUERY_TABLE_ALLOWED and SKIP_REFRESH_FOR_NOT_IN_MEMORY_BIG_TABLES
Use these parameters when you need to limit memory and disk usage, and when response time does not matter

need to force a value during an insert

use INSERT_FORCE_VALUE parameter

function sb_export

loop table_name(columns) function sb_export('path/to/directory','file_tag',thread_count) ...

set_text/set_sparse_text

show table statistics (work in progress)

allow errors in select

Sometimes it can't be easier to ignore errors, it facilitates integration with reporting tool
Parameters: ALLOW_WHERE_ERROR, ALLOW_GROUP_BY_ERROR, ALLOW_EXP_ERROR

sb_parallel

When you use a custom C in multi thread context, you might need each thread to treat a given subset of the data
This is possible in SB, and this is called "sb_parallel mode"
If a where clause use sb_parallel lua function then the "sb_parallel mode" is triggered
For instance here under we want each thread to treat data of a single item_id, hence the sb_parallel(item_id) where clause
In some cases "sb_parallel mode" is replaced by a "mono thread mode"
This happens when pareto in used or when the index of the sb_parallel column cannot be used

fn_compute_info / fn_smart_delete (beta)

set_dirty

refresh a particular view
set_dirty <the_view>

backup

backup 'the_directory'

dates

SB tags

select
SB use_index|no_index|log_verbose|no_cache|explain
..
from ...
Several SB tags can be used

index vs no_index read

index read versus no_index (aka sequential read or full scan) read

countsequence

countsequence(the_column) counts the number of value changes during reading
countsequence can be an alternative to countdistinct
!!! countsequence will return incorrect result if PARETO_LIMIT!=1 !!!

hide data from memory

Parameters: MAX_PERF_FILTER & MAX_PERF_FILTER_FN

countdistinct & high sparsity

Parameters: SEQUENCE_COLUMNS & SEQUENCE_COLUMN_COMPANIONS & USE_INDEX_WITH_SORT_LIMIT & REPLACE_COUNTDISTINCT_BY_COUNTSEQUENCE
SEQUENCE_COLUMNS will tell SB to sort the lines according to a given column

number format/precision