Slow running query

  • I have a huge table with abt 4 million rows and close to 35 columns. If I join this table to say table A and fetch certain rows the results return in 10 secs. But if i normalise this query into 3 small tables and join them and then back to say table A the results return in 3 mins. Is it because there are too many joins been used or is its due to something else. can anyone please shed some light on this.

    TIA

  • The first thing you should check is the execution plan after you have created your small tables. Are there indexes? Are they useful? If your plan creates three table scans that is one of the first things to fix.

    Quand on parle du loup, on en voit la queue

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply