High Performance
Database Consulting

  • Build, repair and optimize complex databases
  • Work directly with a top-tier database expert

SQL Development

SQL (short for Structured Query Language) is a domain-specific computer language designed specifically for interacting with relational database systems. It is typically extended with procedural languages like Transact-SQL (for Microsoft SQL Server) or PL/SQL (for Oracle) that provide the ability to write long and complex stored procedures, functions, DDL scripts, etc. However, it is not a general purpose programming language like Python, Java or C++.

There are many intricacies to the use of SQL, as well as the procedural languages that are typically packaged with them. The way in which tables are joined, the manner in which data manipulation steps are performed, as well as the existence of proper indexes on each table are critical in terms of performance. Writing your SQL one way might sift through millions of rows in a fraction of a second. Written another way, it could take minutes or hours.

I had one project supporting the bond trading desk at Bank of America, during which I rewrote some existing SQL code which literally reduced its average run time from 5 minutes to 5 seconds. That’s the kind of difference you can get when you properly analyze the code and have extensive experience working with it. The client was very happy.

Although there are many tricks to the trade, one of the most common is finding ways to reduce the amount of data worked with up front, or in multiple steps along the way, using temporary tables or Common Table Expressions. You want to slice and filter as quickly as possible, using appropriate indexes, before applying your final mathematical calculations. The last thing you want is to have to scan an entire table of millions of rows.

Whether you’re writing new SQL code from scratch, or you need to review and improve your existing code, I can definitely help out. I’ve been working with the ins and outs of SQL for over 25 years.

“Charlie worked as a part-time consultant for us for two years. He is a highly skilled data analyst with decades of experience, and he particularly excels at the most difficult and messy tasks. In particular, he built a system to extract data from a vendor’s internal database and create an entire reporting system that the vendor was unable to provide. This system is now an integral part of our workflow. I highly recommend Charlie for any level of work.”
DANIEL KOROVIKOV, PSY.D
DIRECTOR OF ANALYTICS
ASTOR SERVICES FOR CHILDREN & FAMILIES
BRONX, NY

Work Samples

Transact SQL Programming

A snippet of code from a stored procedure that analyzes a given home against all the other homes in the same town, using many different combinations of factors. If the given home comes near the top of any of these lists, that analysis is used as supporting documentation in a tax grievance case. This work was done for Taxtrim.com, which I own.

Data Definition Language (DDL)
Here is the DDL code for one of the 50+ tables used by The Sifter.