Re: MSDE Slow in executing Stored Procedures
From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 05/07/04
- Next message: Lau Weng Tat: "Re: MSDE Slow in executing Stored Procedures"
- Previous message: Lau Weng Tat: "Re: MSDE Slow in executing Stored Procedures"
- In reply to: Lau Weng Tat: "Re: MSDE Slow in executing Stored Procedures"
- Next in thread: Lau Weng Tat: "Re: MSDE Slow in executing Stored Procedures"
- Reply: Lau Weng Tat: "Re: MSDE Slow in executing Stored Procedures"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 7 May 2004 09:50:51 +0200
I'm afraid that I'm not following you. In your earlier post, you showed two figures where I/O and duration
differs a lot. And you now say that the perf difference is negliable.
In your original post, you also mention both MSDE (is that MSDE 2000 or MSDE 7.0) vs. SQL Server 2000.
Perhaps you can summarize you'd findings (MSDE vs. SQL Server and INSERT vs. stored procedure)?
If your general case is that the stored procedure is slower than a straight INSERT statement, then it can be
due to things like parameter sniffing, using constants vs. parameter vs. variables in the WHERE clause etc.
But we can't comment on this without seeing the stored procedure vs. the INSERT statement.
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp "Lau Weng Tat" <lwt@ghl.com> wrote in message news:uSdr3EANEHA.1196@TK2MSFTNGP11.phx.gbl... > Well, I've ran SQL Query Analyzer and executed both stored procedure and sql > insert statement. The execution plan looks the same. > If I ran the same stored procedure and insert statement against a SQL 2K > Server, the difference in performance is negligible. > > regards, > Lau > > "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote in > message news:OE8mQW$MEHA.3404@TK2MSFTNGP10.phx.gbl... > > Again, the first step is the check the execution plans and compare them. > Then you have to take it from there > > and try to understand why the plans differ (if they do). > > > > -- > > Tibor Karaszi, SQL Server MVP > > http://www.karaszi.com/sqlserver/default.asp > > > > > > "Lau Weng Tat" <lwt@ghl.com> wrote in message > news:%23M%23J7A%23MEHA.3312@tk2msftngp13.phx.gbl... > > > Thanks for the tip. But I think it's not the cause of the slowdown. > > > I've used profiler to trace the execution for both stored procedure and > > > insert statement. > > > Results were > > > Stored procedure > > > CPU : 0 > > > Reads : 95 > > > Writes : 8 > > > Duration : 179 > > > > > > Insert Statement > > > CPU : 0 > > > Reads : 2 > > > Writes : 0 > > > Duration : 16 > > > > > > Seems that the number of reads and writes is larger for stored > procedures. > > > Any ideas how to speed things up? > > > Btw, the stored procedure and insert statement is identical (insert a > single > > > record with a one column primary key) > > > Thanks! > > > > > > regards, > > > Lau > > > > > > "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote > in > > > message news:OkdkRozMEHA.2484@TK2MSFTNGP09.phx.gbl... > > > > Autoclose for the database is one possible reason. Also check and > compare > > > the execution planes for the > > > > queries. > > > > > > > > -- > > > > Tibor Karaszi, SQL Server MVP > > > > http://www.karaszi.com/sqlserver/default.asp > > > > > > > > > > > > "Lau Weng Tat" <lwt@ghl.com> wrote in message > > > news:%23SHrKJyMEHA.1312@TK2MSFTNGP12.phx.gbl... > > > > > Hi All, > > > > > > > > > > I'm having this performance issue problem with MSDE 2000. I have an > app > > > > > that accesses MSDE database using stored procedures (select, edit, > > > delete) > > > > > I found out that the queries are extremely slow compared to SQL > Server > > > 2000. > > > > > E.g. 70 ms (MSDE) vs 1500ms (SQL 2K) for the entire operations. > > > > > To figure out what was going wrong, i wrote a simple VB application > that > > > > > executes just a simple SQL insert operation, both using stored > procedure > > > and > > > > > a SQL insert statement. Results were : 200ms (Stored Proc) vs 20ms > (SQL > > > > > Insert Statement) > > > > > Does anyone have any idea why stored procedures is so slow? Is there > > > anyway > > > > > to speed things up? > > > > > Thanks! > > > > > > > > > > regards, > > > > > Lau > >
- Next message: Lau Weng Tat: "Re: MSDE Slow in executing Stored Procedures"
- Previous message: Lau Weng Tat: "Re: MSDE Slow in executing Stored Procedures"
- In reply to: Lau Weng Tat: "Re: MSDE Slow in executing Stored Procedures"
- Next in thread: Lau Weng Tat: "Re: MSDE Slow in executing Stored Procedures"
- Reply: Lau Weng Tat: "Re: MSDE Slow in executing Stored Procedures"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|