0

A simple query with where clause on 3 columns and having index on these 3 columns is taking approx 2 sec. The number of records in the table is around 8 million and the result is around 1000-4000 rows. No function used on the columns in the where clause. Same query runs in less than 100 milliseconds from db. We are using NamedParamterJDBCTemplate query method and this method is taking ~2sec

changed the order of index columns so that first column is such that most data gets filtered on that and so on.

apa
  • 1
  • Possible duplicate of [sql runs fast in ssms slow in asp.net](https://stackoverflow.com/questions/10175422/sql-runs-fast-in-ssms-slow-in-asp-net)? – Thom A Mar 26 '19 at 16:20
  • 1
    Parameter sniffing? Mismatched datatypes? Can you share some actual code? – Sean Lange Mar 26 '19 at 16:20

0 Answers0