Question : I am trying to determine which indexes to use for an SQL query with a WHERE condition and […]
Category: Database Optimization
Postgresql 11 – Storing billions of relationships in normalized table paritions or intarray[] column
Question : Some pre information Postgresql Version 11.2 GCE CPU: 6cores SSD: 250gig RAM: 64gigs We are currently deciding on […]
Improve performance on SQL Server Query
Question : I’m trying to increase the performance of a query and I’m out of ideas: The query does this: […]
How to create multiple entries on index based on the fields of one row?
Question : I never found a good way to index multiple fields of one row as entries of an index […]
How to prepare executon plan for given sql query on a server with 4 processors (Oracle database)
Question : 4 processors means the query runs in parallel. Select /*+ parallel(4) */ T1.A FROM T1,T2,T3 WHERE T1.A = […]
Postgresql constraints SARG
Question : Are SQL Server style SARGs relevant to PostgreSQL queries in general and more specifically on table constraints? I […]
Postgres query plan shows sequential scan instead of a index scan with on the fly data
Question : My use case is I am trying to select rows based on a list of known text values. […]
Cardinality , Parallel Hint alternative for MS-SQL
Question : UPDATE MARK M SET ARCHIVE_FLAG = ‘N’ WHERE EXISTS (SELECT /*+ cardinality(S1, 10) parallel(S1,8)*/ 1 FROM SHFASG S, […]
Optimizing multiple MySQL sub-queries and joins for multiple runs
Question : The query (below) that’s running is taking ~0.6 sec which normally would be fine but it gets run […]
Optimization by replacing subquery with named subquery having INLINE hint
Question : Let’s have these two tables: create table table_x( x_id varchar2(100) primary key ); create table table_y( x_id varchar2(100) […]