Tagged With: SQL

Understanding Correlated and Uncorrelated Sub-queries in SQL

August 24, 2017 by “No Bugs” Bunny


Quote:

A correlated sub-query is a type of query, where inner query depends upon the outcome of the outer query in order to perform its execution.

Another Quote:

Correlated sub-queries are slower.

Filed under: On.ProgrammingTips and Tricks

Tagged With: SQLDatabase
Read more

OLTP DB Optimizations 101 - Thinking in Terms of Execution Plans

August 22, 2017 by “No Bugs” Bunny

OLTP DB Optimizations 101 - Thinking in Terms of Execution Plans - Post preview image

Quote:

to realize how our queries are working – we need to start thinking in terms of so-called “execution plans”.

Another Quote:

it can be faster to use Table Scan rather than Index-Scan+fetch over such a low-selectivity index

Filed under: Book: D&D of MOGs1st beta of Vol. VII-IX

Read more

Representing The Same Data Structure in SQL and NoSQL (from Classical Codd-style SQL to Key-Value NoSQL with SQL-with-XML and Structured NoSQL in between)

December 5, 2016 by “No Bugs” Bunny

Representing The Same Data Structure in SQL and NoSQL (from Classical Codd-style SQL to Key-Value NoSQL with SQL-with-XML and Structured NoSQL in between) - Post preview image

Quote:

while duplication MAY indeed improve performance – undue duplication also MAY hit performance pretty badly

Another Quote:

NoSQL will usually call for another denormalisation on top of what we’ve described above for SQL-with-XML.

Filed under: Book: D&D of MOGs1st beta of Vol. IV-VIOn.System ArchitectureDesign decisions

Read more

OLTP. Compiling SQL Bindings.

November 28, 2016 by “No Bugs” Bunny

OLTP. Compiling SQL Bindings. - Post preview image

Quote:

If we’re speaking about millions transactions per day over just a few hundred of different SQL statements – compiling those statements a million times (instead of a few hundred times) will be a dramatic waste of resources.

Another Quote:

Once upon a time, I observed the largest C++ file in my career – it was a 30’000-line file(!) consisting merely of ODBC bindings (and that was just for 300 or so SQL statements)

Filed under: Book: D&D of MOGs1st beta of Vol. IV-VIOn.System ArchitectureDesign decisions

Read more