Performance worse after upgrading from 6.5 to 7

Performance worse after upgrading from 6.5 to 7

Post by BoB Teijem » Fri, 11 Feb 2000 04:00:00



After upgrading from SQL 6.5 to SQL 7 performance dropped dramatically.
Queries that used to take 1 minute in 6.5 now have to be killed after an
hour.
The strange thing is that almost no memory is used although 400MB was
dedicated to SQL Server. The CPU usage in SQL 7 is about 50%, it used to
be about 90% in 6.5. The hard disk activity stops after about 30 seconds
of querying. After that nothing seems to happen.
To avoid the influence of network stuff we ran all client processes on
the server.

So SQL 7 does not use the available resources and we don't know the
reason. Does anybody have a clue?

additional data:
SQL Server 7.0 service pack 1
Windows NT 4.0 Service Pack 5
Server: Compaq Proliant

 
 
 

Performance worse after upgrading from 6.5 to 7

Post by Shane Rya » Fri, 11 Feb 2000 04:00:00


Have you traced the query with profiler, and checked the execution
plans?  What kind of indexes are you using?  Are they fragmented at
all?

--
Shane M Ryan
MCSE+I, MCSD, MCDBA

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Performance worse after upgrading from 6.5 to 7

Post by Ivan Santhumayo » Fri, 11 Feb 2000 04:00:00


Maybe the optimizer index selection has changed for your queries. We had no
problems when we upgraded to SQL7.
Check the ShowPlan and compare it with the SQL 6.5. At times if a
non-clustered index is selected instead of a clustered index it migt degrade
performance.

> After upgrading from SQL 6.5 to SQL 7 performance dropped dramatically.
> Queries that used to take 1 minute in 6.5 now have to be killed after an
> hour.
> The strange thing is that almost no memory is used although 400MB was
> dedicated to SQL Server. The CPU usage in SQL 7 is about 50%, it used to
> be about 90% in 6.5. The hard disk activity stops after about 30 seconds
> of querying. After that nothing seems to happen.
> To avoid the influence of network stuff we ran all client processes on
> the server.

> So SQL 7 does not use the available resources and we don't know the
> reason. Does anybody have a clue?

> additional data:
> SQL Server 7.0 service pack 1
> Windows NT 4.0 Service Pack 5
> Server: Compaq Proliant

 
 
 

Performance worse after upgrading from 6.5 to 7

Post by Erland Sommarsk » Sat, 12 Feb 2000 04:00:00



>After upgrading from SQL 6.5 to SQL 7 performance dropped dramatically.
>Queries that used to take 1 minute in 6.5 now have to be killed after an
>hour.
>The strange thing is that almost no memory is used although 400MB was
>dedicated to SQL Server. The CPU usage in SQL 7 is about 50%, it used to
>be about 90% in 6.5. The hard disk activity stops after about 30 seconds
>of querying. After that nothing seems to happen.
>To avoid the influence of network stuff we ran all client processes on
>the server.

We haven't upgraded our systems to SQL7 yet, but I expect nothing
but hard work ahead. I expect queries to break or produce incorrect
results, and I expect performance hogs to appear. And I expect that
we have to deal with the problems one by one.

In a situation like the one above, you should check for locks and
blocks with sp_who and sp_lock. If one process is blocking the other
ones, the latter won't do any work. If if the blocking process has
gone to lunch, the server will simply be sleeping.

And why would a process go to lunch? Well, when studying a customer's
database, one of the bottlenecks I found was a seemingly innocent function
where the client code failed to somehow consume a result set, leading to
that the transaction started in that SP kept* around. And as
the client proceeded to other functions, it acquired more and more
locks, and when it created temp tables, quite a few processes got
hung.

--

This is an incomplete mess.

 
 
 

Performance worse after upgrading from 6.5 to 7

Post by BoB Teijem » Sat, 12 Feb 2000 04:00:00


The database compatibility was changed a few times. It did not affect
performance.
The problems occur when a report writer (Business Objects) fires a SQL query to
SQL 7. There are no hard coded creations of temp tables or SELECT INTO
statements in these queries.
I do not know how the queries are translated within SQL 7. The temp database is
growing to extreme proportions during the query. (1 GB)
How can we influence temporaty table stuff? The problem is that the queries are
generated automatically, so we can not influence them. So if possible we would
like to take care of the problem by changing some preferences in SQL. Is this
possible?
Yes, we have updated the statistics and rebuilt all indexes. DBCC was all fine

BoB


> What is your database compatiblity level set to?  Use sp_dbcmptlevel
> (documented within BOL) to find out.

> Do your stored procedures create temp tables within them?  If so it is
> recommended to create the temp tables first (CREATE TABLE #...) instead of
> creating them in the middle of the procedure.  Also, SELECT x INTO #b FROM y
> should be rewritten to do the create table up front and then insert into the
> temp table.

> have you updated statistics?
> run dbcc?

> Keith

> Keith



> > After upgrading from SQL 6.5 to SQL 7 performance dropped dramatically.
> > Queries that used to take 1 minute in 6.5 now have to be killed after an
> > hour.
> > The strange thing is that almost no memory is used although 400MB was
> > dedicated to SQL Server. The CPU usage in SQL 7 is about 50%, it used to
> > be about 90% in 6.5. The hard disk activity stops after about 30 seconds
> > of querying. After that nothing seems to happen.
> > To avoid the influence of network stuff we ran all client processes on
> > the server.

> > So SQL 7 does not use the available resources and we don't know the
> > reason. Does anybody have a clue?

> > additional data:
> > SQL Server 7.0 service pack 1
> > Windows NT 4.0 Service Pack 5
> > Server: Compaq Proliant

 
 
 

Performance worse after upgrading from 6.5 to 7

Post by Erland Sommarsk » Sat, 12 Feb 2000 04:00:00



>After upgrading from SQL 6.5 to SQL 7 performance dropped dramatically.
>Queries that used to take 1 minute in 6.5 now have to be killed after an
>hour.
>The strange thing is that almost no memory is used although 400MB was
>dedicated to SQL Server. The CPU usage in SQL 7 is about 50%, it used to
>be about 90% in 6.5. The hard disk activity stops after about 30 seconds
>of querying. After that nothing seems to happen.
>To avoid the influence of network stuff we ran all client processes on
>the server.

We haven't upgraded our systems to SQL7 yet, but I expect nothing
but hard work ahead. I expect queries to break or produce incorrect
results, and I expect performance hogs to appear. And I expect that
we have to deal with the problems one by one.

In a situation like the one above, you should check for locks and
blocks with sp_who and sp_lock. If one process is blocking the other
ones, the latter won't do any work. If if the blocking process has
gone to lunch, the server will simply be sleeping.

And why would a process go to lunch? Well, when studying a customer's
database, one of the bottlenecks I found was a seemingly innocent function
where the client code failed to somehow consume a result set, leading to
that the transaction started in that SP kept* around. And as
the client proceeded to other functions, it acquired more and more
locks, and when it created temp tables, quite a few processes got
hung.

--

This is an incomplete mess.

 
 
 

1. 6.5 7.0 Upgrade SQL Server Performance Issues Stored Procedure

Just trying to save some other poor soul with my extensive list of
keywords.

SQL Server 7.0 doesn't like to combine stored procedures with views.

In 6.5 I had a posting alorythm that took about 20 minutes each night
to run. I converted to 7.0, and it then took about 6 hours.

the proc went something like this:
get first thing to post
do while not out of things to post
    create cursor of the detail stuff for main item using view and
unique key
    loop through cursur to calculate all the detail stuff up
    write stuff out to permanent file
    Get next thing to be posted.
loop

turns out that the create cursor line called a view. the view went
ahead and did a HUMOUNGOUS join of all the various detail files and
all permutations, then the cursor sorted through that to figure out
which 3 of the lines it needed. Considering what it was doing, it was
AMAZINGLY fast. And because it was in the create cursor, I never did
see it through the optimizer stuff.

sql server 6.5 had a different approach - it found the 3 lines it
needed, then did joins to get the ancillary stuff to support it.
I cut and pasted the code that made the view into the stored
procedure, and now the posting alogrythm is about 6 minutes per night.
YMMV.

All in all, sql server 7.0 Flat FLIES compared to 6.5. Went from
constant complaints about system speed to "the system is now fast
enough!".

Doug Miller

2. version number for a database on an SQL Server

3. Losing performance after upgrade from 6.5 to 7.0

4. WANTING TO BUY

5. Performance problems after Upgrade SQL-Server 6.5 to 2000

6. sound in prog under Win98, but not when compiled under W2000

7. SQL 7.0 Performance Problem after 6.5 Upgrade

8. Access To SQL Server Connection

9. performance problem with SQL server 6.5 after upgrade to NT 4.0 from NT 3.51

10. huge performance problem on upgrade from 6.5 to 2000

11. Upgrading SQL Server 6.5 to 7.0 and Upgrading VB 5.0 to 6.0

12. MSSQL Server 6.5 unable to upgrade to SP5, but it can be upgrade to SP4

13. 6.5 to 7 Upgrade can not select Tape Upgrade option