Create index in database
create_index(
con,
tbl,
flds,
geom = F,
unique = F,
overwrite = F,
show = F,
exec = T
)
database connection from DBI::dbConnect()
, eg from am_pg_con()
table name as character
character vector of fields in table used for index
logical (default: FALSE) whether geometry field, so create GIST() index
logical (default: FALSE) whether to impose a unique constraint, to prevent duplicates; default: FALSE
logical (default: FALSE) whether to overwrite existing index
logical (default: FALSE) whether to show SQL statement
logical (default: TRUE) whether to execute SQL statement
nothing
if (FALSE) {
con <- am_pg_con()
create_index(con, "am_cell_blocks", "geom", geom=T)
create_index(con, "am_cell_blocks", "zcb_id")
}