Learn R Programming

SCDB (version 0.5.1)

create_index: Create the indexes on table

Description

Create the indexes on table

Usage

create_index(conn, db_table, columns)

Value

NULL (called for side effects)

Arguments

conn

(DBIConnection)
A connection to a database.

db_table

(id-like object(1))
A table specification (coercible by id()).

columns

(character())
The columns that should be unique.

Examples

Run this code
if (FALSE) { # requireNamespace("RSQLite", quietly = TRUE)
  conn <- get_connection()

  mt <- dplyr::copy_to(conn, dplyr::distinct(mtcars, .data$mpg, .data$cyl), name = "mtcars")
  create_index(conn, mt, c("mpg", "cyl"))

  close_connection(conn)
}

Run the code above in your browser using DataLab