LinuxCommandLibrary

dexter

Automate Android instrumentation tests execution and management

TLDR

Create and authenticate a user with Google OIDC

$ dexter auth [[-i|--client-id]] [client_id] [[-s|--client-secret]] [client_secret]
copy

Override the default kube configuration file location
$ dexter auth [[-i|--client-id]] [client_id] [[-s|--client-secret]] [client_secret] [[-k|--kube-config]] [sample/config]
copy

SYNOPSIS

dexter query [options]

PARAMETERS

query
    The SQL query to analyze.

--create
    Generate CREATE INDEX statements.

--drop
    Generate DROP INDEX statements (to remove unused indexes).

--format
    Output format (e.g., text, json).

--database
    Specifies the database to use.

--driver
    Specifies the database driver to use (e.g., postgres, mysql).

--host
    The database host.

--port
    The database port.

--user
    The database user.

--password
    The database password.

DESCRIPTION

Dexter is a tool designed to automatically suggest indexes for your database based on the execution of SQL queries.
Unlike comprehensive database workload analysis tools, Dexter focuses on analyzing individual queries or small sets of queries, making it suitable for identifying missing indexes that can improve the performance of specific slow-running queries.

It works by analyzing the query execution plan (obtained through tools like `EXPLAIN` or similar mechanisms depending on your database system). Dexter then determines the columns that are most likely to benefit from indexing, considering factors such as selectivity, filtering, and joining.

The tool outputs a set of `CREATE INDEX` statements that you can then apply to your database to potentially optimize query performance.
Dexter supports various database systems, adapting its analysis and index suggestion logic to each specific database dialect.

CAVEATS

Dexter only analyzes individual queries. It doesn't consider the overall database workload.
Index creation should be done with care, considering the impact on write performance.
Requires proper database credentials and access permissions.

DATABASE SUPPORT

Dexter typically supports common databases such as PostgreSQL, MySQL, and potentially others via specific database drivers.
Refer to the tool's documentation for the specific list of supported databases and driver requirements.

INDEX SELECTION CRITERIA

Dexter uses information from the query execution plan, such as the cost of operations and the number of rows scanned, to evaluate potential indexes.
It prioritizes columns used in `WHERE` clauses, `JOIN` conditions, and `ORDER BY` clauses. It also considers the data types of the columns when formulating the recommended indexes.

HISTORY

Dexter has been developed as an open-source tool to simplify the index recommendation process for individual SQL queries, aiming to provide a focused alternative to broader database profiling suites.
It's designed to be easily integrated into development and testing workflows for quick index optimization.

SEE ALSO

explain(1), psql(1)

Copied to clipboard