Screens: SQL editor

SQL history and saved SQL

NeoSQL keeps the SQL executed in a project as execution history. The Project railSQL History panel of the right rail shows the history of the whole project, and the History tab of the SQL editor's result area shows the history of that SQL document. Execution history piles up by itself each time SQL runs; SQL you save to open again is a SQL document in the ERD and SQL list.

Where you can use itWebDesktopWithout signing inSigned inLocal projectsAccount projects

What's on the screen

No.NameDescription
1Project railSQL History buttonA button on the right rail. Opens and closes the panel.
2Header buttonsThe Refresh, Open larger view ('Finding records' below), Pin and Close buttons. When pinned with the Pin button, the panel floats over the center screen instead of narrowing it.
3Users fieldFilters by who ran the SQL. Shown only in local projects and, in account projects, to the Owner, Manager and DBA roles.
4AI switchWhen on, only records run by the AI Assistant panel and external MCP clients remain.
5History cardOne card per execution, newest on top. It shows the statement kind (SELECT, DML, DDL), an AI mark if AI ran it, who ran it, the start of the SQL, the time it ran, whether it succeeded and how long it took. Click it to open the SQL History Detail window.
  • Records are loaded 100 at a time; if there are more, the Load More button at the end of the list loads the next ones.
  • To search by the text of the SQL, use the SQL History window that the Open larger view button opens.

What is recorded

Where it ranStatements recorded
The Execute and Run Script buttons of the SQL editorEvery statement, including queries. Failed statements are kept with their error message
Applying result grid editsThe INSERT, UPDATE and DELETE statements run when applying
SQL run by the AI Assistant panel, SQL sent by external MCP clientsThe statements run. They get the AI mark
Other screens (applying an ERD to the database, saving a table, running a DDL approval, Data Import... and so on)Statements that changed the schema or data (DDL and DML)
  • Execution plans fetched with the Plan button are not recorded (Execution plan).
  • SQL text is stored only up to 64KB. For longer SQL only the beginning is kept.
  • A record also keeps the run target (connection, database, schema), the row count (rows fetched for a query, rows changed for a change) and how long it took. Result data is not kept.

Finding records

  1. Click the Open larger view button in the panel header. The SQL History window opens.
  2. Type part of the SQL in the Search SQL field. As you type, only records containing that text remain.
  3. If needed, filter further with the Users field and the AI switch.
  4. Move between pages with the page numbers at the bottom, and choose 50, 100 or 200 rows per page.
  • The table's columns are Type, AI, Status, SQL, User, Executed At, Connection, Database, Schema, Rows, Time and the error message. Click a column header to sort within the current page.
  • Click a row to open the SQL History Detail window.

Reusing a record

Click a card or a table row to open the SQL History Detail window. It shows the run target, the row count, how long it took and the full SQL.

  1. Click the Copy button to copy the SQL.
  2. Open a SQL tab, paste it, check the run target and run it.
  • Check yourself that the run target matches the record before running.
  • For a failed record, you can get AI help below the error message. This help is not available for SQL cut off at 64KB (AI in the editor and ERD).

The History tab of the SQL editor

The History tab at the right end of the SQL editor's result area shows only the records run from this SQL document.

  • The Search history... field (1) keeps only records whose SQL contains the text you type.
  • Double-click a history row (2) to insert that SQL at the cursor position in the editor. It is not run.
  • For a failed record the statement kind mark is red (3), with the error message below.
  • Records belong to the document. If you close the tab and open it again, the document's records are still there. Records of a new SQL tab that has not been saved yet move to that document when it is first saved.

Saved SQL documents

Unlike execution history, a SQL document is SQL you create, name and save. They are gathered by connection, database and schema in the ERD and SQL list at the lower left of the project screen, and open as a SQL tab when clicked. Creating and editing them is explained in SQL editor.

Execution historySQL document
CreatedAutomatically, each time SQL runsWhen you create and save it
RemovedAutomatically, after the retention period. You cannot delete records yourselfKept until you delete it
Who sees it in an account projectDepending on the role, records of other members too (table below)Only the person who created it. Unlike team ERDs, it is not shared with members

Where records are kept and for how long

Local project (desktop)Account project
Where execution history is keptThis deviceThe NeoSQL server
Retention period7 days, regardless of planDepends on the project's plan (Plans and features)
Where SQL documents are keptThe project on this deviceThe NeoSQL server
Who ran itNot distinguished. Recorded as the single user of this deviceThe account that ran it

In an account project, the range of execution history you can see depends on your role. The server decides the range; the Users field can only narrow it.

RoleRecords shown
Owner, ManagerAll records of the project
DBAYour own records and those of members with the Member role
MemberYour own records

Things to keep in mind

  • Execution history keeps the SQL text as is. If you run SQL with values such as passwords or personal data written in it, in an account project the record stays on the server and the roles in the table above can see that SQL.
  • Records past the retention period are deleted and cannot be recovered. Save SQL you want to keep as a SQL document. If the plan of an account project is lowered, records past the new retention period are deleted.
  • The records of a local project are only on this device and cannot be seen from other devices.
  • Some of the grey suggestion text in the editor comes from what you ran on this connection (SQL editor).