Skip to content Skip to sidebar Skip to footer
Showing posts with the label Query Performance

Case Clause Execution Procedure

Hi i have a SQL which is extremely slow. select case when (value=1) then (select from table where… Read more Case Clause Execution Procedure

How To Obtain The Most Recent Row Per Type And Perform Calculations, Depending On The Row Type?

I need some help writing/optimizing a query to retrieve the latest version of each row by type and … Read more How To Obtain The Most Recent Row Per Type And Perform Calculations, Depending On The Row Type?

Does It Worth Switching A Primary Key From The Type Nvarchar To The Type Int?

On our SQL SERVER 2008 R2 database we have an COUNTRIES referential table that contains countries. … Read more Does It Worth Switching A Primary Key From The Type Nvarchar To The Type Int?

Rownumber() And Partition By Performance Help Wanted

I've got a table of stock market moving average values, and I'm trying to compare two value… Read more Rownumber() And Partition By Performance Help Wanted

How To Get Data From 4 Tables In 1 Sql Query?

I have the following database schema: table courses: id tutor_id title table course_categories: … Read more How To Get Data From 4 Tables In 1 Sql Query?

Postgres Select N Equally Distributed Rows By Time Over Millions Of Records

I have a table with columns id,filter1,filter2,time,value which contains millions of records. I wan… Read more Postgres Select N Equally Distributed Rows By Time Over Millions Of Records

Painfully Slow Postgres Query Using Where On Many Adjacent Rows

I have the following psql table. It has roughly 2 billion rows in total. id word lemma … Read more Painfully Slow Postgres Query Using Where On Many Adjacent Rows

Cost Of Sort Is Slowing Down My Query

PostgreSQL 7.4 (Yep upgrading) So in my WHERE condition I have this AND CASE WHEN 'substri… Read more Cost Of Sort Is Slowing Down My Query