About Us

The ever changing database management challenges
With the rapid changes of modern databases, database administrators and developers have to learn and manage new features provided by databases with short period of time. There is always a time gap between fully mastering new features and actually implementing the new features in production.

Easy-to-use AI enabled tools for SQL & database performance tuning
Tosska Technologies is a company that focuses in providing solutions for database and SQL related performance optimization and improvements. Our mission is to help users to smooth out the hurdle by our new technologies. Indeed Tosska is one of the very few companies in the world that focus in using artificial intelligence technology to solve various database performance problems. It is our goal to help our customers to reduce their hardware investment; increase their database applications service level and free up their human resources for more strategic activities with our innovative technologies.

Our Products

The Tosska SQL Tuning Expert Products Family

Not just another SQL Tuning tool !
Most SQL tuning products in the market aim to provide better query plan visualization, better statistics analysis, high cost query plan steps indication or even rule-of-thumb syntax recommendations. But very few of them can provide satisfactory tuning results directly. They require users to have in-depth SQL tuning knowledge to manually intervene the SQL tuning process amid their busy daily duties. In fact users are looking for one-button-solution tool that have all the required SQL tuning knowledge built-in and can tune a SQL statement automatically without the need of users’ intervention. If you are looking for such tools, these are the products you must look into !

World’s Leading A.I. SQL Rewrite technology for SQL
Manually rewriting SQL syntax to tune a SQL statement is commonly adopted by experienced developers and DBAs, but the effort and cost to rewrite a SQL statement is quite expensive. Tosska A.I. SQL Rewrite Engine not only saves the developer’s time to rewrite a problematic SQL statement to make it faster, but it also explores the potential best SQL syntax that even an experienced developer cannot discover. Tosska A.I. rewritten SQL syntax can work with our Hints-injection algorithm to further explore more potential query plans that even most experienced developers cannot achieve.


Tosska SQL Tuning Expert (TSES™) for SQL Server®

There are not many SQL tuning tools for SQL Server database that can provide automated direct SQL tuning results. Tosska SQL Tuning Expert (TSES™) for SQL Server® is a a one-button-solution tool that can tune SQL Server SQL statements automatically without the need of your intervention. You can just sit back, relax, and wait for the best SQL alternative to come up on your screen.

Probably the World’s First SQL Server A.I. SQL Tuning Tool for SET ROWCOUNT N
Many people do not know that the Set Rowcount N setting can affect the SQL’s query plan and some SQLs’ performance may be degraded and resulted in an even worse query plan. Tosska SQL Tuning Expert for SQL Server is probably the first tool that can solve this problem automatically with our A.I. engine.

Powerful Cold Cache SQL Tuning for Infrequent Executed SQL Statements
Cold cache will significantly affect the performance of a SQL statement. A good performance SQL for hot cache may not be performing well in a cold cache environment. Tosska SQL Tuning Expert for SQL Server provides a handy function for users to benchmark SQL alternatives in both environments without complicated manual operations.

View Details | Free Download | Buy License

Tosska SQL Tuning Expert (TSEM™) for MySQL®
As a member of the TSE product family, TSEM™ provides all the automatic A.I. machine tuning capability of TSE but tailors for the MySQL database. It is a one-button-solution tool that can tune MySQL SQL statement automatically without the need of your intervention. You no longer need to rewrite or try every possible Hints combination manually for a problematic SQL statement to explore potential better performance execution plans, since all those hard tasks are released by our embedded AI engine.

Probably the World’s ONLY A.I.-based SQL Rewrite solution for MySQL database
It not only saves developer’s time to rewrite a problematic SQL statement to make it faster, but also explores the potential best SQL syntax that even an experienced developer cannot discover. Tosska A.I. rewritten SQL syntax can also work with our Hints-injection algorithm to further explore more potential query plans that even most experienced developers cannot achieve.
A 100 times faster SQL rewrite is generated on the right hand side.

Tosska proprietary Tree Plan format for your easy understanding
Tosska SQL Tuning Expert (TSEM™) for MySQL® has a market leading explain plan function for MySQL. The proprietary Tree Plan format provides rich statistics information like what is provided by Tubular Explain from MySQL, as well as a hierarchical structure like what is displaying in visual plan. The beauty is that all such information can be displayed in a small window for easy reading.

Tosska Tree Plan

View Details | Free Download | Buy License

 
Tosska SQL Tuning Expert for Oracle® (TSE™ and TSE Pro™) version 4

 

 
Targeted for the Oracle database, Tosska SQL Tuning Expert (TSE™) for Oracle® and Tosska SQL Tuning Expert Pro (TSE Pro™) for Oracle® are complete SQL tuning solutions that provide SQL syntax rewrite, Query Hints injection and index recommendation to maximize the performance of a SQL without compromise in any specific feature’s limitation.

They give users the ultimate SQL performance solution by just point and click without the need of user’s involvement. What you have to do is to input your problematic SQL statement into the product and press a button. You don’t have to do analysis, guessing or testing during the entire SQL tuning process. The improved SQL statement will be benchmarked with your original SQL statement side by side without suspicion.

World’s Leading A.I. SQL Rewrite technology for Oracle database
Tosska’s A.I. SQL Rewrite plus the A.I. Hints Injection Engine is the world’s leading machine SQL Tuning technology for Oracle database. It saves developer’s time to rewrite a problematic SQL by exploring the potenial best SQL syntax and hints injection that even an experienced developer cannot discover.

Plan Control feature to tune your SQL even if you don’t have the source code
Tosska SQL Tuning Expert Pro (TSE Pro™) also comes with an innovative Plan Control function that improves your SQL performance without touching your program source code. Users can even deploy different performance query plans for various sizes of production databases without the effort of keeping multiple versions of the program source, it is especially suitable for package application users who don’t own the source code of their applications. For application developers, a problematic SQL statement can be improved without going through the time-consuming unit test, integration test and program implementation required in software development cycle.

Intelligent Workload-Based Index Advisor
Apart from the intelligent SQL tuning features, a powerful indexes recommendation function is also provided in TSE Pro™ to help users to review and explore more potential indexes that are helpful but may be missing in current database schema.

It is an intelligent and cost-aware index advice engine that helps users to review their existing database schema if there are any new indexes which can help to improve a given SQL workload. The engine can handle up to thousands of SQL statements and give you a reasonable recommendation that even human experts cannot achieve.

Product feature comparison of TSE Pro™ and TSE™

View Details | Free Download – TSE™ / TSE Pro™ | Buy License – TSE™ / TSE Pro™

 

Tosska In-Memory Maestro (TIM™) for Oracle® automates the In-memory SQL optimization process and provide In-memory objects recommendations for a given SQL workload with our proprietary artificial intelligent engine.

Tosska In-memory Maestro (TIM™) also provides user friendly In-memory simulation function for user to virtually evaluate their in-memory table objects for one SQL or a given SQL workload captured from SGA or AWR without actually populating those table objects.





View Details | Download Free Trial | Buy License

Our Company

Tosska Technologies Limited is a young and energetic company that provides intelligent database tuning tools to help our customers to optimize their databases performance to the maximum within the current database and hardware limitation.

With the rapid changes of modern databases, database administrators and developers have to learn and manage new features provided by databases with short period of time, there is always a time gap between fully mastering new features and actually implementing the new features in production.

Our mission is to help users to smooth out the hurdle by our new technologies. Furthermore, Tosska is one of the very few companies in the world that focuses on using artificial intelligence technology to solve various database performance problems. It is our goal to help our customers to reduce their hardware investment; increase their database applications service level and free up their human resources for more strategic activities with our innovative technologies.

Tosska has a very strong technical team. Our CTO has over twenty year experiences in the Artificial Intelligent software development field supported by a development team with solid database management related software development experience in fortune 500 international corporations.

News


MySQL database and SQL

Effective database management requires one or more tools regardless of the platform your databases run on. The benefit of these tools is, whether they are operating on Windows, macOS, Linux, or the cloud, the tools mentioned below don’t require the same platform as the databases. 

Thanks to plenty of choices when it comes to SQL management tools, it may seem difficult to select the ones that will work best as per your specific needs. In this blog, we’ve picked out the best paid and free SQL tools for Windows along with their essential features.

Free SQL Tools for Windows with a Graphical User Interface (GUI)

Consider the following free SQL tools for Windows to help you with efficient database management:

  1. SQL Server Data Tools (SSDT)

The SSDT is designed for a variety of databases such as Azure SQL, SQL Server relational databases, RS reports(Reporting Services), IS packages(Integration Services), and AS data models (Analysis Services). It is a development tool that allows users to create and implement any SQL Server content form with a convenience identical to that of Visual Studio.

  1. SQL Server Management Studio (SSMS)

The SQL Server Management Studio tool comes with an interactive Graphical User Interface that helps users control a SQL Server database or an instance. Users can gain access to any part of the SQL Server, Azure Synapse Analytics, or the Azure SQL Database and make changes, regulate, supervise, and develop them. 

You may want to look for this tool when you download free SQL Server as it also offers an all-encompassing utility which brings together a wide range of graphical tools along with several rich script editors. These are useful to DBAs and developers of varying skill levels.

  1. Visual Studio Code

The Visual Studio Code enables users to write T-SQL scripts using a compact editor. We are talking about the mssql extension – the official extension for Visual Studio Code that supports SQL Server linking and offers a productive T-SQL editing experience.

  1. Azure Data Studio

This is also a compact and handy editor capable of running SQL various functions including –

  • Executing SQL statements whenever required
  • Organizing preferred database connections
  • Viewing and storing results in text, JSON, or Excel format
  • Exploring database objects in a familiar environment
  • Editing information

Tosska’s Range of SQL Tuning & Query Optimizer Tools

Tosska Technologies offers several solutions to improve database performance through query optimization in SQL. With the goal of introducing new technologies that will help users overcome SQL-related obstacles, they provide a range of software designed using AI technology capable of solving a broad range of database performance issues.

Here’s what this range includes:

  • Tosska SQL Tuning Expert (TSES™) for SQL Server® – Unlike some of the free SQL tools for Windows, this is a powerful tool that doesn’t require professional expertise to tune your SQL queries. The AI engine does all the work, generating the most useful hints and alternate SQL statements that are semantically equivalent to the query that’s been entered to know whether there are better execution plans. You may pick the best option among the ones provided by the engine.
  • Tosska SQL Tuning Expert (TSEM™) for MySQL® – The TSEM™ comes with the A.I. capabilities of the TSE product range. However, this one-button-solution tool is tailored specifically for the MySQL database, tuning MySQL SQL queries without the users’ intervention. Users don’t have to perform manual rewriting or use the hit-and-trial method for each troublesome query, since it’s all handled by our embedded AI engine.
  • Tosska SQL Tuning Expert for Oracle® (TSE™ and TSE Pro™) version 4 – This tool comes with features exclusive to this family of tools, such as SQL rewrite, index exploration, and injecting Oracle hints to help tune SQL queries and boost their performance. It may or may not access your source code depending on the requirements, and the tool comes with a smart Indexes Advisor that offers cost-efficient indexes as per the workload. Make sure you get it when you download free tool and take advantage of this cutting-edge technology!
  • Tosska In-Memory Maestro (TIM™) for Oracle® – The TIM™ transforms the in-memory SQL optimization process into an automatic one and gives suggestions according to the SQL workload in question through our proprietary A.I. engine. It also offers a user-friendly simulation feature that virtually assesses table objects present in the memory for a SQL workload but doesn’t occupy those table objects.
Oracle database and SQL

Bind Variables are typically considered as one of the major aspects of enhanced SQL query performance. According to Oracle documentation, they serve as a placeholder in a SQL query, getting replaced by a particular value that helps in statement execution.

The use of these variables enables users to create statements that can receive time-running parameters or inputs. One may think of bind variables as “value” given to the SQL query that acts as any function in programming languages. Here, we will talk more about them as well as their advantages and disadvantages in Oracle database and SQL.

Bind Variables: Examples of Their Uses

Consider the following statements in SQL –

Select * from Staff where S_No = 1 ;

Select * from Staff where S_No = :a ;

In the first query, a proper value (1) is applied to operate the query, whereas, in the next query, we have used a bind variable (:a) to operate the statement. This bind variable is given to Oracle when the query is run.

Defining a bind variable in the SQL statements in the place of literal values ensures that a single Parent Cursor is utilized by Oracle for the query. This helps improve database performance because Oracle searches for precise text matches for the query to check whether it already exists in the shared pool. Using a bind variable rather than a literal value saves an expensive hard parse for each run of that query.

Bind variables prove especially useful in OLTP-type environments because their use facilitates soft parsing. In other words, it takes less processing time to re-generate execution plan.

How Bind Variables Help Improve Database Performance

Given below are some advantages of using bind variables:

  1. Optimal Use of Shared Pool – The Shared Pool in Oracle Database needs to hold a single query instead of possibly numerous queries, thanks to bind variables.
  2. Improved Performance Due to Zero Hard Parsing – There is no need for hard parsing because SQL queries only diverge in terms of values.
  3. Decreased “library cache” Latch Contention – Since library cache latch contention is needed during a hard parse, its requirement reduces when bind variables are used.

Shortcomings of Bind Variables

The disadvantages of using bind variables are few. Although bind variables prove excellent if you want to improve Oracle database performance, there are instances where their use can negatively impact results:

  • They can decrease the flow of information needed to compute the best access path for CBO (Cost Based Optimizer). The CBO, in turn, may fail to identify the correct selectivity and create insufficient bad execution plans, opting for a complete table scan instead of using indexes.
  • Sometimes, the CBO requires the literal value to be used by SQL in order to build a robust execution plan. With bind variables, the literal value gets “hidden”, so the CBO is likely to create a subpar plan.

To overcome this issue, Oracle has tried to provide further assistance to the CBO by enabling it to take a look at the bind variable’s value during execution plan creation, which is known as “Bind Variable Peeking”.

Conclusion

The use of bind variables is extremely useful in Oracle database performance, especially when it comes to OLTP environments. However, as a user, you need to be careful while using bind variables. . It is recommended to use bind variables for short runtime SQL, but use literals for long time SQL statements to more information to CBO to generate good query plans.

Click to view Tosska SQL Tuning Expert (TSES™) for SQL Server 1.5.0 Release Notes

Tosska SQL Tuning Expert for MySQL

Click to view Tosska SQL Tuning Expert for MySQL (5.1-5.5) (TSEM5™) 2.3.0 Release Notes

Click to view Tosska SQL Tuning Expert (TSE™) 4.3.0 Release Notes

Click to view Tosska SQL Tuning Expert Pro (TSE Pro™) 4.3.0 Release Notes

Click to view Tosska SQL Tuning Expert (TSEM™) for MySQL 2.3.0 Release Notes

Click to view Tosska SQL Tuning Expert (TSES™) for SQL Server 1.0.5 Release Notes

SQL performance tuning

A database is a piece of software operating on a computer, which means it is dependent and likely to face the same limitations as other software present on that computer. In other words, it will only be able to process as much data as the hardware can handle.

One of the best ways to speed up queries is to perform SQL performance tuning. In this post, we will answer some of the most frequent questions involving databases and indexes.

What is Indexing in SQL Query Optimization?

Indexing is one of the first things you may have come across while learning the ropes of your database. It is a wonderful tool that enables users to enhance the efficiency of their database. However, bear in mind that not every database requires indexing, and not all indexes are helpful in SQL performance tuning.

Let’s learn more about indexing: what it is and how it helps in enhancing database performance.

How do Indexes Affect SQL Query Performance?

An Index can locate data swiftly without having to go through each row in the table. This saves plenty of time! 

Certain data columns are required before you can create an index. These are –

  • The Search Key which holds a duplicate of the primary key
  • The Data Reference which has a set of pointers

All of these constitute the structure of one index. To understand how an index works, let us take an example. Suppose you need to look for a bit of data in your database. Rather than scour every line yourself, you make the computer search each row till it locates the information. Remember that the search is bound to take much longer if the requisite information is located at the end. Fortunately, you have the option to sort alphabetically to shorten the length of such queries.

What are the Types of Database Indexes?

Database indexes are of two kinds –

Clustered indexes – These arrange data using the primary key. The reason behind using a clustered index is to make sure the primary key is saved in ascending order. This is the same order in which the table stores memory.

A clustered index is automatically created when the primary key is set, which helps in SQL tuning for Oracle in the long run as well.

Non-clustered indexes – A non-clustered index is a data structure that boosts data fetching speed. It is different from clustered indexes, as they are made by data analysts or developers.

When and How Should We Use Indexes?

Since indexes are intended to accelerate database performance, you should apply them whenever you think they can simplify the use of the database. Although smaller databases may not have several opportunities to use indexes, they are likely to see the benefits of indexing as they grow into larger databases. 

You can make sure your indexes keep performing well, if you test run a set of queries on your database first. Clock the time those queries take to execute and begin creating your indexes after that. Keep rerunning these ‘tests’ for continuous improvements.

Conclusion

Indexing has its challenges, the biggest one being determining the best ones for every table.

For instance, heaps require clustered indexes because searching for a record in a heap table is comparable to finding a needle in a haystack: it’s inefficient and time-consuming, thanks to the heap’s unordered structure.

On the other hand, locating data is simpler and faster from a table that contains a proper clustered index, just like finding a name in a list that’s alphabetically ordered. DBAs, therefore, recommend that every SQL table contains a proper clustered index. Now that you know how indexes work and how they can optimize database performance, you should be able to use them to reduce query times substantially. If you would like more tips on how to use indexing, or you need a SQL query optimization tool for your database, let our experts know!

This is the second blog in our two-part series to explain the best ways to optimize your database, which is best done by enhancing the SQL queries being used. Without much ado, let’s pick up where we left off –

Give Preference to WHERE, instead of HAVING (when defining filters)

A query is efficient when it saves resources by fetching only what’s needed from the database. According to the Order of Operations defined in SQL, WHERE queries are calculated before HAVING statements.

Therefore, it is advisable to give preference to WHERE over HAVING when the goal is to filter a query on the basis of conditions for greater efficiency. 

For instance, let us suppose a hundred sales have been made during the year 2019, and a user wishes to put in a query to determine what the number of sales was for the same time period. They may write something like this:

SELECT Clients.ClientID, Clients.Name, Count(Sales.SalesID)

FROM Clients

   INNER JOIN Sales

   ON Clients.ClientID = Sales.ClientID

GROUP BY Clients.ClientID, Clients.Name

HAVING Sales.LastSaleDate BETWEEN #1/1/2019# AND #12/31/2019#

This statement would return at least a thousand sales records from the Sales table, then filter these thousand records to find the hundred records generated in the year 2019, and lastly, tally the data in the dataset.

If we compare the above with the same instance using the WHERE clause instead, there is a limit placed on the number of records fetched:

SELECT Clients.ClientID, Clients.Name, Count(Sales.SalesID)

FROM Clients

  INNER JOIN Sales

  ON Clients.ClientID = Sales.CustomerID

WHERE Sales.LastSaleDate BETWEEN #1/1/2019# AND #12/31/2019#

GROUP BY Clients.ClientID, Clients.Name

This statement would return the hundred records from the year 2019, after which it would count the records in the dataset, thereby getting rid of the first step in the HAVING clause.

Keep wildcards strictly at the end of a statement

A wildcard creates the largest search possible when looking for plaintext information like names or designations. However, the wider a search, the less efficient it is, and a leading wildcard worsen the performance – particularly when it’s used with an ending wildcard.

That’s because the database has to find every single record that remotely matches the selected field. Take this query to fetch cities beginning with ‘Ch’, for instance:

SELECT Cities FROM Clients

WHERE Cities LIKE ‘%Ch%’

This statement will not just fetch the expected results of Chicago, Chester, and Chelsea, but will also return unintended results, like Richardson, Canal Winchester, and Cannon Beach.

A more productive statement would be:

SELECT Cities FROM Clients

WHERE Cities LIKE ‘Ch%’

This query will lead only to the expected results of Chicago, Chester, and Chelsea.

Use LIMIT to sample query results

The use of a LIMIT query will make sure the results of new SQL queries are relevant and desirable. As the name suggests, its function is to limit the quantity of records to the number mentioned, saving a lot of resources in the process.

Considering the 2019 sales query from above, let us suppose a limit of 15 records:

SELECT Clients.ClientID, Clients.Name, Count(Sales.SalesID)

FROM Clients

  INNER JOIN Sales

  ON Clients.ClientID = Sales.ClientID

WHERE Sales.LastSaleDate BETWEEN #1/1/2019# AND #12/31/2019#

GROUP BY Clients.ClientID, Clients.Name

LIMIT 15

The results will indicate if the data set is worth using or not.

Adjust Your Timing a Bit

If you’re looking to minimize the impact of your analytical queries on the production database, consult with an Oracle Database Administrator regarding the scheduling of your SQL queries so that they can be run during off-peak hours.

Specific hours when there are fewest concurrent users, generally in the middle of the night, should be chosen to run such resource consuming queries. If your SQL queries are more likely to include the following criteria, consider running it during off-peak timings:

  • Selecting from huge tables (where there are over a million records)
  • Queries with Cartesian or Cross Joins
  • Looping queries
  • SELECT DISTINCT queries
  • Subqueries that are nested
  • Search queries involving wildcards in long text or memo areas
  • Numerous schema statements

Query with Confidence!

Keeping these and other SQL tips into consideration will certainly enable you to construct efficient, smart queries that will operate swiftly and fetch your team the game-changing insights it needs.