
Hi,
no current query limit anymore, the query governour went into retirement :-). Only limitations like those you mentioned are applied.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
sql
no current query limit anymore, the query governour went into retirement :-). Only limitations like those you mentioned are applied.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
sql
Hi,
I tested a simple query like Select colA from TableB where colC= 'XX' with SQL2000 and SQL2005.
Of course, Index is same, number of records are same.
After I execute that query and checked it with profiler. SQL2000 just took 18 ms but SQL2005 took 118 ms in my environment. Actually, the machine that is installed SQL2005 has better H/W spec than SQL2000.
I could not belive that so I tested several times but SQL2005 was slow.
After I searched this forum, I found that some guys had same problem with SQL2005 performance. I rebuilt index in SQL2005 but didn't work.
Even though I am using SP2, it is still slow than SQL2000.
Am I missing somthing? I could not understand how it could happen.
Does anybody have any solution?
Thank you in advance
James
did you clear the proc cache before running the procedures? Running the commands below will ensure that you are running both sprocs on common ground:DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
Also, you can't always go by the time it takes to run a query. You really need to compare the logical reads returned by running the command SET STATISTICS IO ON before you run the statements to compare the reads. If your reads are drastically different, something may be funky.
Tim|||
Tim,
Thank you for answer.
Actually, before I tested, I restarted all services so it was not a problem of cache.
In addition, reads in profile log of SQL2005 is more than SQL2000 which is not strange based on the result.
Funny thing is speed is smiliar after data is cached. This problem happened when I tried data from disk.
I am not sure what is wrong.
I should discuss it with MS support soon.
Thank you
James
|||After you upgraded the database to SQL 2005 did you update the stats or rebuild the indexes? It's recommended to update the stats on the tables and indexes after upgrading to SQL 2005 to get proper query plans in SQL 2005.|||Thank you Denny for replying
Unfortunately, it didn't work
Actually, I didn't migrate DB from SQL2000. I just created exactly same DB as SQL2000.
100ms is not a big deal for a SQL statement but if a stored procedure has 1000 sql statements. It will be 100,000ms which is a big.
This can explain why same stored procedure is slower than SQL2000.
James.
|||Try optimising the data disks:
1) Set the disk to Basic disk
2) If the disk subsystem is RAID, set the stripe size to 64k, and the controller cache to 100% write.
3) Using DISKPART, create the partition using the command CREATE PARTITION PRIMARY ALIGN=64
4) Format the data disk with a cluster size of 64k.
Now you're ready to go from the disk side of things!
|||Does the execution plans show the SQL Servers taking the same path to the data? Where do the cost differences show up?|||Danny and BigE
Thank you for replying.
Well. Execution plan is exactly same. I am not sure where it comes from.
As I said the machine that has SQL2005 is better H/W spec so I don't think it is a problem of H/W as BigE said.
I might try to do as BigE suggested but I could not agree we should set this for running SQL2005.
Think about that. SQL2005 is advanced version than SQL2000 which is 7 years ago!! Why does user consider about those kinds of disk setting? Even though it is ture, what is the big benefit of upgrading to user who is using small or medium application?
Anyway, If you have two machine that has SQL2000 and SQL2005, just try a select statement and check read and duration.
You will notice what I am saying..
Hi James,
Did you get the solution as you described?
I have same problem and I cannot find any solutions.
Please help.
Clara
|||Thank you BigE
I think your suggestion might improve performance but here is my concern about using SQL2005.
If it is a problem of Disk speed, Why does MS provide a fucntion to make DATABASE on top of the MEMORY DISK?
In other words, MS can create MEMORY DISK DATABASE in SQL2008 for better performance !
Maybe they will say to me that I am crazy but... If you can use UPS, then SQL server can dump that memory database to Disk during UPS is working.
Anyway, I could not buy that reason becaue , As I said, the SQL is running slower server than SQL2005.
By copying Clara,
Sorry, I could not find the solution yet. One of MS consultant that I know gave to me some suggestion but it doesn't work.
Maybe I should try SQL2008 CTP instead of SQL2005
Regards,
James Lim
Hi,
I tested a simple query like Select colA from TableB where colC= 'XX' with SQL2000 and SQL2005.
Of course, Index is same, number of records are same.
After I execute that query and checked it with profiler. SQL2000 just took 18 ms but SQL2005 took 118 ms in my environment. Actually, the machine that is installed SQL2005 has better H/W spec than SQL2000.
I could not belive that so I tested several times but SQL2005 was slow.
After I searched this forum, I found that some guys had same problem with SQL2005 performance. I rebuilt index in SQL2005 but didn't work.
Even though I am using SP2, it is still slow than SQL2000.
Am I missing somthing? I could not understand how it could happen.
Does anybody have any solution?
Thank you in advance
James
did you clear the proc cache before running the procedures? Running the commands below will ensure that you are running both sprocs on common ground:DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
Also, you can't always go by the time it takes to run a query. You really need to compare the logical reads returned by running the command SET STATISTICS IO ON before you run the statements to compare the reads. If your reads are drastically different, something may be funky.
Tim|||
Tim,
Thank you for answer.
Actually, before I tested, I restarted all services so it was not a problem of cache.
In addition, reads in profile log of SQL2005 is more than SQL2000 which is not strange based on the result.
Funny thing is speed is smiliar after data is cached. This problem happened when I tried data from disk.
I am not sure what is wrong.
I should discuss it with MS support soon.
Thank you
James
|||After you upgraded the database to SQL 2005 did you update the stats or rebuild the indexes? It's recommended to update the stats on the tables and indexes after upgrading to SQL 2005 to get proper query plans in SQL 2005.|||Thank you Denny for replying
Unfortunately, it didn't work
Actually, I didn't migrate DB from SQL2000. I just created exactly same DB as SQL2000.
100ms is not a big deal for a SQL statement but if a stored procedure has 1000 sql statements. It will be 100,000ms which is a big.
This can explain why same stored procedure is slower than SQL2000.
James.
|||Try optimising the data disks:
1) Set the disk to Basic disk
2) If the disk subsystem is RAID, set the stripe size to 64k, and the controller cache to 100% write.
3) Using DISKPART, create the partition using the command CREATE PARTITION PRIMARY ALIGN=64
4) Format the data disk with a cluster size of 64k.
Now you're ready to go from the disk side of things!
|||Does the execution plans show the SQL Servers taking the same path to the data? Where do the cost differences show up?|||Danny and BigE
Thank you for replying.
Well. Execution plan is exactly same. I am not sure where it comes from.
As I said the machine that has SQL2005 is better H/W spec so I don't think it is a problem of H/W as BigE said.
I might try to do as BigE suggested but I could not agree we should set this for running SQL2005.
Think about that. SQL2005 is advanced version than SQL2000 which is 7 years ago!! Why does user consider about those kinds of disk setting? Even though it is ture, what is the big benefit of upgrading to user who is using small or medium application?
Anyway, If you have two machine that has SQL2000 and SQL2005, just try a select statement and check read and duration.
You will notice what I am saying..
Hi James,
Did you get the solution as you described?
I have same problem and I cannot find any solutions.
Please help.
Clara
|||Thank you BigE
I think your suggestion might improve performance but here is my concern about using SQL2005.
If it is a problem of Disk speed, Why does MS provide a fucntion to make DATABASE on top of the MEMORY DISK?
In other words, MS can create MEMORY DISK DATABASE in SQL2008 for better performance !
Maybe they will say to me that I am crazy but... If you can use UPS, then SQL server can dump that memory database to Disk during UPS is working.
Anyway, I could not buy that reason becaue , As I said, the SQL is running slower server than SQL2005.
By copying Clara,
Sorry, I could not find the solution yet. One of MS consultant that I know gave to me some suggestion but it doesn't work.
Maybe I should try SQL2008 CTP instead of SQL2005
Regards,
James Lim
Hi,
I tested a simple query like Select colA from TableB where colC= 'XX' with SQL2000 and SQL2005.
Of course, Index is same, number of records are same.
After I execute that query and checked it with profiler. SQL2000 just took 18 ms but SQL2005 took 118 ms in my environment. Actually, the machine that is installed SQL2005 has better H/W spec than SQL2000.
I could not belive that so I tested several times but SQL2005 was slow.
After I searched this forum, I found that some guys had same problem with SQL2005 performance. I rebuilt index in SQL2005 but didn't work.
Even though I am using SP2, it is still slow than SQL2000.
Am I missing somthing? I could not understand how it could happen.
Does anybody have any solution?
Thank you in advance
James
did you clear the proc cache before running the procedures? Running the commands below will ensure that you are running both sprocs on common ground:DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
Also, you can't always go by the time it takes to run a query. You really need to compare the logical reads returned by running the command SET STATISTICS IO ON before you run the statements to compare the reads. If your reads are drastically different, something may be funky.
Tim|||
Tim,
Thank you for answer.
Actually, before I tested, I restarted all services so it was not a problem of cache.
In addition, reads in profile log of SQL2005 is more than SQL2000 which is not strange based on the result.
Funny thing is speed is smiliar after data is cached. This problem happened when I tried data from disk.
I am not sure what is wrong.
I should discuss it with MS support soon.
Thank you
James
|||After you upgraded the database to SQL 2005 did you update the stats or rebuild the indexes? It's recommended to update the stats on the tables and indexes after upgrading to SQL 2005 to get proper query plans in SQL 2005.|||Thank you Denny for replying
Unfortunately, it didn't work
Actually, I didn't migrate DB from SQL2000. I just created exactly same DB as SQL2000.
100ms is not a big deal for a SQL statement but if a stored procedure has 1000 sql statements. It will be 100,000ms which is a big.
This can explain why same stored procedure is slower than SQL2000.
James.
|||Try optimising the data disks:
1) Set the disk to Basic disk
2) If the disk subsystem is RAID, set the stripe size to 64k, and the controller cache to 100% write.
3) Using DISKPART, create the partition using the command CREATE PARTITION PRIMARY ALIGN=64
4) Format the data disk with a cluster size of 64k.
Now you're ready to go from the disk side of things!
|||Does the execution plans show the SQL Servers taking the same path to the data? Where do the cost differences show up?|||Danny and BigE
Thank you for replying.
Well. Execution plan is exactly same. I am not sure where it comes from.
As I said the machine that has SQL2005 is better H/W spec so I don't think it is a problem of H/W as BigE said.
I might try to do as BigE suggested but I could not agree we should set this for running SQL2005.
Think about that. SQL2005 is advanced version than SQL2000 which is 7 years ago!! Why does user consider about those kinds of disk setting? Even though it is ture, what is the big benefit of upgrading to user who is using small or medium application?
Anyway, If you have two machine that has SQL2000 and SQL2005, just try a select statement and check read and duration.
You will notice what I am saying..
Hi James,
Did you get the solution as you described?
I have same problem and I cannot find any solutions.
Please help.
Clara
|||Thank you BigE
I think your suggestion might improve performance but here is my concern about using SQL2005.
If it is a problem of Disk speed, Why does MS provide a fucntion to make DATABASE on top of the MEMORY DISK?
In other words, MS can create MEMORY DISK DATABASE in SQL2008 for better performance !
Maybe they will say to me that I am crazy but... If you can use UPS, then SQL server can dump that memory database to Disk during UPS is working.
Anyway, I could not buy that reason becaue , As I said, the SQL is running slower server than SQL2005.
By copying Clara,
Sorry, I could not find the solution yet. One of MS consultant that I know gave to me some suggestion but it doesn't work.
Maybe I should try SQL2008 CTP instead of SQL2005
Regards,
James Lim
Hi All,
I have a large number of SPs that I would like to be able to document and provide this documentation to prospective clients. That is, provide them enough information without giving them the source code for the procedures.
I have found that all the parameters are in the sys.parameters table.
But I was wondering. Are the fields that are sent back out of an SP captured and recorded somewhere in the SQL Server catalog?
Is there an easy way to find out what fields are coming out of an SP?
Thanks in Advance
Peter
You may be better served exploring one of the third party documentation tools.
I like ApexSQL's Doc tool.
You can download a fully functional eval version.
|||
Hi Arnie,
thanks for the tip...I'll take a look..
Peter
I have one table and it contains a column named ID Number, and a column named Date. I have a Do While statement that runs a SQL select statement a few times based on the number of records with the same ID Number. During the Do While statement the information is copied into another table and deleted from the old table. After I look at the results, I see that at the second Do While loop, the data was not selected and the Select statement did not run... so the old variable value from varValue is used again... Any reasons on why?
Here is a code snippet of what is going on:
Any ideas?After playing around with this for a while, I found that the select statement is incorrect. The part where it says date<@.date... this selects more than one row, instead of just selecting one row.
Do While varCount < varRecordCount
conSqlConnect.Open()
cmdSelect = New SqlCommand ("Select * From temp_records_1 where [id number]=@.idnumber and date<@.date", conSqlConnect)
cmdSelect.Parameters.Add( "@.accountnumber", "10000" )
cmdSelect.Parameters.Add( "@.date", dtnow )
dtrdatareader = cmdSelect.ExecuteReader()
While dtrdatareader.Read()
If IsDbNull(dtrdatareader("value")) = false Then
varValue = dtrdatareader("value")
End If
End While
dtrdatareader.Close()
conSqlConnect.Close()'#####The information above is copied to another table here
'#####The record where the information was received is deleted.varCount = varCount + 1
Loop
I read articles that discuss using select MAX(column) but that will only return one column... how can I select a row based on a column with the maximum value?|||ok... great got it working now... just post the answer here for future reference... I went ahead and did Select Top 1 * instead of Select *... it solved everything...
log backup overwrite,log backup