createIndex | R Documentation |
Create an index on one or more columns in an Andromeda table
createIndex(tbl, columnNames, unique = FALSE, indexName = NULL)
tbl |
An |
columnNames |
A vector of column names (character) on which the index is to be created. |
unique |
Should values in the column(s) be enforced to be unique? |
indexName |
The name of the index. If not provided, a random name will be generated. |
Indices can speed up subsequent queries that use the indexed columns, but can take time to create, and will take additional space on the drive.
Invisibly returns the input table.
listIndices()
, removeIndex()
andr <- andromeda(cars = cars)
createIndex(andr$cars, "speed")
# Will be faster now that speed is indexed:
andr$cars %>%
filter(speed == 10) %>%
collect()
close(andr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.