Removes an index from an Andromeda table

removeIndex(tbl, columnNames = NULL, indexName = NULL)

Arguments

tbl

An Andromeda table (or any other 'DBI' table).

columnNames

A vector of column names (character) on which the index was created. If not provided, then the indexName argument must be provided.

indexName

The name of the index. If not provided, the columnNames argument must be provided.

Value

Invisibly returns the input table.

Details

Remove an index created using the createIndex() function. Either the index name or the column names on which the index was created must be provided.

Examples

andr <- andromeda(cars = cars)

createIndex(andr$cars, "speed")

# Will be faster now that speed is indexed:
andr$cars %>%
  filter(speed == 10) %>%
  collect()
#> # A tibble: 3 × 2
#>   speed  dist
#>   <dbl> <dbl>
#> 1    10    18
#> 2    10    26
#> 3    10    34
  
removeIndex(andr$cars, "speed")

close(andr)