Question : select column_1, (column_1 <-> cube(:input)) / (:input <-> cube(0)) difference from table_1 for this query, is calculation of […]
Category: Database Optimization
Speed up INSERTs
Question : I need to have a way to insert to a table, fast, synchronous, with minimal duration. What I’ve […]
What indexes should one use to optimize a PostgreSQL query with a JOIN depth of 2?
Question : Disclaimer: I am relatively new to PostgreSQL. I’m wondering how to optimize a query that does 2 INNER […]
Optimizing Slow Changing Dimension (SCD2) joins
Question : Right now I’m working on developing a DB schema for an application which requires versioning several different sets […]
In PostgreSQL, what area in memory does HashSetOp use, work_mem or shared_buffer?
Question : I want to know the difference between the hash table in a hash join and the hash table […]
How to improve estimate of 1 row in a View constrained by DateAdd() against an index
Question : Using Microsoft SQL Server 2012 (SP3) (KB3072779) – 11.0.6020.0 (X64). Given a table and index: create table [User].[Session] […]
How to avoid full table scan when using OR operator on an Index
Question : Essentially, I want to get intersection between 2 tables based on matching IDs with the option of wildcard […]
Fetching rows from million rows table(Optimization)
Question : I have millions of rows in a table of Greenplum database out of which I have to fetch […]
Multi-row insert vs multiple single row inserts
Question : In my app I do multi-row inserts when I can just because it reduces the number of round […]
sys.dm_exec_query_stats – what causes total_worker_time to be reset? How to work around that?
Question : I am monitoring stored procedure executions, mainly the execution times and the CPU usage, using sys.dm_exec_query_stats in the […]