R/db_analyse.R

Defines functions db_analyse

Documented in db_analyse

#' Function to analyse/analyze a database table. 
#' 
#' @param con Database connection. 
#' @param table Database table. 
#' 
#' @author Stuart K. Grange
#' 
#' @return Invisible.
#' 
#' @export
db_analyse <- function(con, table) {
  
  # Postgres
  if (db.class(con) == "postgres")
    db_send(con, stringr::str_c("ANALYZE ", table))
  
  # No return
  
}
skgrange/databaser documentation built on April 21, 2024, 6:30 a.m.