gonsalu / SqlQueryStress

SQL Query Stress Generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SQLQueryStress

.NET Core

This project was inspired by Adam Mechanics original SQLQueryStress.

Getting Started

  1. Create a database connection
  • Open the connection dropdown from the toolbar and select "Connection Manager"
  • Click the new connection button.
  • Choose a name, database engine and specify a connection string.
  • Click Save and close all but the main window.
  1. Enter your query in the main query editor.

  2. If your query has parameters, set values using the parameters window.

  • Open the Parameters window by clicking on the parameters button within the toolbar.

Parametised Queries

SQLQueryStress currently supports three types of query parameters:

  1. Random numbers within a range
  2. Random dates
  3. Parameter values which come from a database query.

Query parameters should use the @paramName syntax, e.g.:

SELECT * FROM myTable WHERE myColumn = @myParam

There is also the concept of "Linked Parameters" for situations where a parameter value is dependant on the value of another parameter, such as the end date in a date range.

As an example, to configure a date range first configure the start date parameter by setting the parameter type to "Random Date Range", then specify a minimum date, maximum date and maximum interval between the dates in the range. The end date can then be configured by setting the paramater type to "Random Date Range" and setting the Linked Parameter to @StartDate.

Screenshots

SQLQueryStress: SqlQueryStress

Execution Details: ExecutionDetails

Road Map

  • Support for other database engines (I.E Couchbase, PostgreSQL)
  • Parameter Validation
  • Query Performance Comparison
  • Add histograms to help visualise query performance.

Contributing

Pull requests are welcome.

About

SQL Query Stress Generator


Languages

Language:C# 98.2%Language:PowerShell 1.8%