Ben Nadel is thrilled to see that his SQL DEBUG comments show up in both the FusionReactor Cloud and Enterprise dashboards. This makes identifying performance bottlenecks in the database so much easier.
For years, I've been advocating that people put [DEBUG](https://www.bennadel.com/blog/3058-putting-debug-comments-in-your-sql-statements-makes-debugging-performance-problems-easier.htm)
comments in their SQL statements to help identify performance bottlenecks in their applications. I feel so strongly about this that I'm absolutely nonplussed whenever I see a SQL query show-up in the MySQL slow-log or the process-list without a DEBUG
statement. Recently, we installed FusionReactor at work; and, I was thrilled to see that my DEBUG
statements were showing up in the database profiling that FusionReactor provides.
To see what I mean, let's create a test ColdFusion page that executes a slow SQL query that will show up in FusionReactor's slow transaction list. For this simulation, we can use MySQL's SLEEP()
command:
<cfscript>
dump( getPost( 3 ) );
// ------------------------------------------------------------------------------- //
// ------------------------------------------------------------------------------- //
public array function getPost( required numeric id ) {
// NOTE: We're using MySQL's SLEEP() command to simulate a performance bottleneck
// in order to get this page to show up in FusionReactor's slow transaction log.
var result = queryExecute(
sql = "
/* DEBUG: fusionReactorTesting.getPosts(). */
SELECT
e.id,
e.content,
e.content_markdown,
-- Simulating a slow query, sleep for 5-seconds.
( SLEEP( 5 ) ) AS temp
FROM
blog_entry e
WHERE
e.id = :id
;
",
params = {
id: { value: id, sqlType: "integer" }
},
options = {
returnType: "array"
}
);
return( result );
}
</cfscript>
SQL stands for Structured Query Language. SQL is a scripting language expected to store, control, and inquiry information put away in social databases. The main manifestation of SQL showed up in 1974, when a gathering in IBM built up the principal model of a social database. The primary business social database was discharged by Relational Software later turning out to be Oracle.
Debug SQL stored procedures and develop your SQL database project with dbForge SQL Complete, a new add-in for Visual Studio and SSMS. When you develop large chunks of T-SQL code with the help of the SQL Server Management Studio tool, it is essential to test the “Live” behavior of your code by making sure that each small piece of code works fine and being able to allocate any error message that may cause a failure within that code.
This article provides an outlook on various types of subqueries in SQL such as select or other T-SQL statements and caveats when using them.
This is part 3 of “MS SQL Server- Zero to Hero” and in this article, we will be discussing about the SCHEMAS in SQL SERVER. Before getting into this article, please consider to visit previous articles in this series from below.
Are you interested in learning how to translate your existing SQL Server expertise to Azure SQL including Azure SQL Database and Azure SQL Managed Instance? In this episode, Bob Ward, Anna Hoffman, and Marisa Brasile announce all-new content on YouTube, Github, and Microsoft Learn to help you become an Azure SQL professional.