Skip to content

Getting started

Charly edited this page May 30, 2020 · 1 revision

Installation/Upgrade

Checkout git repository

git clone https://github.com/Sargul/exasol-statistics.git

Open create.sql in your favorite sql editor

I'm using DBeaver as it is open source and I'm the maintainer of the Exasol Plugin. If you are using DBeaver make sure that you have set disable the option "Blank line is statement delimiter".

Otherwise the creation of objects will fail

Create lua scripts

If you are using another SQL editor than DBeaver you will have to replace

@set schema=STATISTICS
open schema :schema;

whatever schema you want to use. In DBeaver you can execute and create all necessary functions by ALT+x

Install/Tables

open schema :schema
EXECUTE SCRIPT install_upgrade()

This will create the statistics tables and necessary parameters table with default values for the thresholds for certain statistics

Gather statistics

open schema :schema
EXECUTE SCRIPT gather_statistics();

This script will always gather the statistics in delta mode, so only missing values will be gathered

Clone this wiki locally