Track and Re-Execute Past SQL Commands with KeepTool

    Published 31. August 2020

    Updated October 2025


    Introduction

    Ever run a complex SQL query, only to lose track of it minutes later? Or wished you could re-execute a past statement quickly, without digging through logs?

    With KeepTool’s SQL Execution History feature, all your past statements are tracked and easily accessible. You can review performance metrics or simply re-run them at will. This is available today in the SQL Editor (and in Hora’s script panes).

    Let’s explore how it works and why you’ll want it in your toolkit.


    How Execution History Works

    Every time you run a query or statement (e.g., SELECT, INSERT, etc.), KeepTool captures:

    • The timestamp

    • The user/schema

    • The SQL text

    • Execution duration

    • SQL*Plus-style output (if any)

    • Rows processed

    • Any exception details

    These are saved to a database table. Even if you close the editor or session, they’re still available afterward.

    SQL execution history in Hora

    SQL execution history in Hora

    You can filter history entries by SQL type (e.g. SELECT, DML), date/time range, or schema.


    Viewing & Filtering Past Statements

    In the SQL Editor window, click “History” (often a clock icon or menu option). This opens the Execution History grid. You’ll see a list of past commands, with overhead columns showing key info.

    You can sort or filter by:

    • Date/Time

    • Duration

    • Schema/User

    • Success or error

    Clicking an entry will show you the full SQL and its execution metadata (duration, row count, etc.).

    This makes it easy to find your most expensive queries, troubleshoot errors, or re-use useful statements.


    Re-executing Past SQL

    Need to run a past query again? Just right-click a chosen history row and select “Re-run” (or “Insert into Editor”). It places the SQL back into the active editor for review, adjustment, or execution.

    You can adjust parameters or minor differences before executing — a big time saver.


    Why It Matters

    • Productivity boost: Re-run complex statements without copy-paste errors

    • Audit trail: Track who ran what, when, and with what results

    • Performance tuning: Quickly locate the slow or heavy queries

    • Error debugging: Inspect past failures and repeat test cases


    Try It Today

    Want to see SQL Execution History in action? Head to the SQL Editor in your KeepTool installation and open the History tab.

    ➡️ Try KeepTool for free

    KeepTool's Oracle tools are designed specifically for developers, DBAs, and support teams.
    Based on over 25 years of experience, we continuously optimize our software to make your database analysis and documentation faster, more efficient, and clearer.