Configures the sort order for data files in a table. When new data is written, it will be sorted by these columns within each file. This improves query performance for range scans and filters on the sorted columns.
See also
db_recluster() to apply sort order to existing data, db_write()
with sort_by parameter
Examples
if (FALSE) { # \dontrun{
db_connect()
# Set sort order for time-series queries
db_set_clustering(table = "events", columns = c("event_date", "user_id"))
# Remove sort order
db_set_clustering(table = "events", columns = NULL)
} # }