Stored Procedure takes a stupidly long time
From: Steven Scaife (spam)
Date: 08/03/04
- Next message: Doug Blystoen: "Re: Code Review"
- Previous message: Vern Rabe: "View latency?"
- Next in thread: Adam Machanic: "Re: Stored Procedure takes a stupidly long time"
- Reply: Adam Machanic: "Re: Stored Procedure takes a stupidly long time"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 3 Aug 2004 18:28:45 +0100
Hi, I have just started a new job and my first task is to test the viability
of placing the database, currently 80 gig, and holding 3.5 million customers
onto the intranet. The current system that they use to update search etc
the details, is via a C++ front end and a typical search for example on
mcdonalds takes about 4 secs.
In my stored procedure I am looking at just short of 2 mins to get the same
data. I am using a like statement with the % wildcard before and after the
search criteria. I know this is pretty crappy but it appears that the old
system uses a similar searching method. If i remove the beginning % then it
is an instance search, but it needs to match mcdonalds anywhere in the
company name. eg it could be edward mcdonalds & son but all they remember is
the mcdonalds bit. This is the first time i have used SQL server, I am a
recent graduate, but have experience with ASP for the last two years using
Access in a business environment, which is why they set me on, to work
wonders with ASP (hopefully lol). As I understand a stored procedure is a
compiled SQL statement that does a lot more, ie loops and stuff. So this is
the first time i created one. Is there a better way of performing the
search I need cutting down the search time. to a reasonable amount. I
thought of IN but thats not what is required. Also i may not have created
the stored procedure right. I created in the computer management snap in
where you can view tables, stored procedures in a window. do i have to do
something to compile it or is it already compiled.
thanks for your time
- Next message: Doug Blystoen: "Re: Code Review"
- Previous message: Vern Rabe: "View latency?"
- Next in thread: Adam Machanic: "Re: Stored Procedure takes a stupidly long time"
- Reply: Adam Machanic: "Re: Stored Procedure takes a stupidly long time"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|