July 15, 2016 at 11:34 am
I am run into an situation with a change in behavior to one query, and I'm looking for advice on how to interpret this.
July 15, 2016 at 12:01 pm
I know if you looking into the Prod , it's trying to retrieve the data from ## million rows but at the one which has ##% cost. I will that only reason costing us low performance. I think it might missing index but i am unable to pit point the which one has the missing index.
July 15, 2016 at 12:12 pm
Before I look at the query plans I have several questions:
1) are the sql server versions (and database compatibility levels) EXACTLY the same?
2) are the state of the involved tables (columns, indexes, data and statistics) EXACTLY the same?
3) are the settings on the two SQL Servers EXACTLY the same?
4) are all physical characteristics between the two servers EXACTLY the same? RAM and CPU are the main thing here.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
July 15, 2016 at 12:22 pm
Here is my response
1) are the sql server versions (and database compatibility levels) EXACTLY the same?
AK - there are the exactly same setting
2) are the state of the involved tables (columns, indexes, data and statistics) EXACTLY the same?
AK - All the setting involved in both the tables are Exactly same
3) are the settings on the two SQL Servers EXACTLY the same?
AK - Yes Same
4) are all physical characteristics between the two servers EXACTLY the same? RAM and CPU are the main thing here.
AK - Prod is more powerful than QA environment
July 15, 2016 at 12:42 pm
I notice that the QA plan parallelizes out much farther than the first one. How many logical CPUs does each have and what are the max DOP settings?
July 15, 2016 at 12:51 pm
Strange ...I was just looking into the setting and i had found these
LogicalCPUs on Prod is 32
LogicalCPUs on Dev is 40
MAX DOP Setting on Prod is 8
MAX DOP setting on Dev is 16
July 15, 2016 at 12:54 pm
You also need to make sure that statistics are up to date on the tables involved and you also need to consider differences in table volume and range(s) of data involved.
Most people forget or just don't update stats on Dev or Staging/Test boxes.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 15, 2016 at 1:11 pm
SQLBuzz (7/15/2016)
Strange ...I was just looking into the setting and i had found theseLogicalCPUs on Prod is 32
LogicalCPUs on Dev is 40
MAX DOP Setting on Prod is 8
MAX DOP setting on Dev is 16
And yet you had just told me the settings were identical on both boxes. :blink:
Also note that simply having a more powerful machine is cause for query plan differences even with every, and I mean EVERY OTHER SINGLE THING identical between the boxes/sql server/databases/etc.
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
July 15, 2016 at 1:23 pm
mmm
July 15, 2016 at 1:59 pm
SQLBuzz (7/15/2016)
Yeah my bad, I was told the system i identical on both the environment.But this issues was raised recently and it was working perfectly fine last 6 months with an issues.
Most likely scenarios given new information:
A) somebody changed some setting/configuration/machine and you get a different plan
B) data/statistical differences let to a plan change in one but not the other database
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
July 18, 2016 at 9:07 am
I just recently published a blog post [/url]on this very topic. I'd suggest doing the checks that I did.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
July 18, 2016 at 9:17 pm
TheSQLGuru (7/15/2016)
SQLBuzz (7/15/2016)
Strange ...I was just looking into the setting and i had found theseLogicalCPUs on Prod is 32
LogicalCPUs on Dev is 40
MAX DOP Setting on Prod is 8
MAX DOP setting on Dev is 16
And yet you had just told me the settings were identical on both boxes. :blink:
Also note that simply having a more powerful machine is cause for query plan differences even with every, and I mean EVERY OTHER SINGLE THING identical between the boxes/sql server/databases/etc.
And now we know the reason I don't answer these types of questions. 😛 The answer is always "something is different... go figure it out". 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply