Find Jobs
Hire Freelancers

Check functionality of conversion of dynamic sql code to ordinary sql

$30-5000 USD

Completed
Posted over 13 years ago

$30-5000 USD

Paid on delivery
Hello, I have a SQL Server 2008 stored procedure ([login to view URL]) that intermittently runs very slowly. Normally it completes in under 2 seconds, but occasionally it takes 75 seconds to complete. It runs dynamic SQL (i.e. it builds a string inside the procedure and runs it as a sql command). I think that the reason it sometimes runs slow is that SQL Server builds a new query plan each time it runs, and sometimes this plan is bad, causing the slow run. Although I could try to get SQL Server to store a saved plan by replacing: exec sql with: sp_executesql I have decided instead to rewrite it as a normal query (i.e. without using dynamic SQL). The purpose of this project is to ask you to compare the old one with the new one I've written, and check that the functionality of the new one is exactly the same as the old one, whatever the parameters. Really just to check that I haven't made any silly mistakes. The old stored procedure is in: [login to view URL] The new stored procedure is in: [login to view URL] and the new one uses a function "udf_CommaStringToTable" in: [login to view URL] Any other thought or suggestions would be welcomed. An example of how the stored procedure is called, with parameters, is in the comments section of the new stored procedure. These parameters can vary. Note I have substituted for the at character in this listing, because rentacoder doesn't like that character. Many Thanks, Neil Miller Windmill IT Ltd ## Deliverables 1) All deliverables will be considered "work made for hire" under U.S. Copyright law. Employer will receive exclusive and complete copyrights to all work purchased. (No 3rd party components unless all copyright ramifications are explained AND AGREED TO by the employer on the site per the worker's Worker Legal Agreement). ## Platform SQL Server 2008 (not RC2) running on Windows 2008 DataCentre edition. select version gives: Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) Mar 29 2009 10:11:52 Copyright (c) 1988-2008 Microsoft Corporation Standard Edition (64-bit) on Windows NT 6.0 (Build 6002: Service Pack 2)
Project ID: 2965888

About the project

6 proposals
Remote project
Active 13 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$80.75 USD in 3 days
5.0 (2 reviews)
3.0
3.0
6 freelancers are bidding on average $113 USD for this job
User Avatar
See private message.
$25.50 USD in 3 days
4.8 (84 reviews)
5.7
5.7
User Avatar
See private message.
$42.50 USD in 3 days
4.7 (3 reviews)
2.2
2.2
User Avatar
See private message.
$250 USD in 3 days
4.4 (1 review)
1.3
1.3
User Avatar
See private message.
$21.25 USD in 3 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$255 USD in 3 days
0.0 (2 reviews)
0.0
0.0

About the client

Flag of UNITED KINGDOM
Tadley, United Kingdom
5.0
4
Member since Jul 10, 2007

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.