locked
Using TSQL for the first time RRS feed

  • Question

  • I am writing an app that will use many tables and i have been told that using stored procs in the app. is not the way to go, that it is too slow. It has been suggested i use TSQL. I have only used stored procs till now. in what way is using TSQL different, how can I get up to speed. IN fact, is this the way to go for faster data access or is there other methods?
    Tuesday, August 30, 2011 8:13 PM

Answers

  • Strange.... Stored procs inturn uses the TSQL... TSQL is building blocks for your Stored procs... There might be some other reasons why your product dont want to use the stored procs in your design.

    If you just want to do the data access and the CRUD operations then you might use Dynamic data scaffolding of ASP.net 

    http://msdn.microsoft.com/en-us/library/ee377606.aspx

    Or if your application is based on silverlight you can use WCF RIA services by building a entity model.

    But if you want to use the old school and write the hard coded TSQL from your application then you can... It does not give you any big performance improvement than the other but the flexibility will be great.

     


    Nothing is Permanent... even Knowledge....
    My Blog
    • Marked as answer by KJian_ Wednesday, September 7, 2011 7:13 AM
    Tuesday, August 30, 2011 9:14 PM
  • I am assuming that what you are being told is that in your application you have tsql code instead of calling stored procs. Stored procs are a far better approach for you to follow as they are precompiled and the execution plan is able to be re-used. As long as your queries are tuned appropriately and you have appropriate indexes etc your performance will be better.
    Warwick Rudd MCT MCITP SQL Server 2008 Admin
    • Proposed as answer by Naomi N Tuesday, September 6, 2011 2:58 PM
    • Marked as answer by KJian_ Wednesday, September 7, 2011 7:13 AM
    Tuesday, August 30, 2011 9:24 PM
  • As stated above, stored procedures are the best way to go for many reasons. Articles:

    Benefits of Using SQL Server Stored Procedures with Visual Basic and Web Applications By Alison Balter

    SQL Server Stored Procedures By Mike Chapple

     

    Stored procedure examples: http://bit.ly/pXcPy0


    Kalman Toth, SQL Server & Business Intelligence Training; sqlusa.com
    • Proposed as answer by Naomi N Tuesday, September 6, 2011 2:58 PM
    • Marked as answer by KJian_ Wednesday, September 7, 2011 7:13 AM
    Tuesday, September 6, 2011 2:43 PM

All replies

  • Strange.... Stored procs inturn uses the TSQL... TSQL is building blocks for your Stored procs... There might be some other reasons why your product dont want to use the stored procs in your design.

    If you just want to do the data access and the CRUD operations then you might use Dynamic data scaffolding of ASP.net 

    http://msdn.microsoft.com/en-us/library/ee377606.aspx

    Or if your application is based on silverlight you can use WCF RIA services by building a entity model.

    But if you want to use the old school and write the hard coded TSQL from your application then you can... It does not give you any big performance improvement than the other but the flexibility will be great.

     


    Nothing is Permanent... even Knowledge....
    My Blog
    • Marked as answer by KJian_ Wednesday, September 7, 2011 7:13 AM
    Tuesday, August 30, 2011 9:14 PM
  • I am assuming that what you are being told is that in your application you have tsql code instead of calling stored procs. Stored procs are a far better approach for you to follow as they are precompiled and the execution plan is able to be re-used. As long as your queries are tuned appropriately and you have appropriate indexes etc your performance will be better.
    Warwick Rudd MCT MCITP SQL Server 2008 Admin
    • Proposed as answer by Naomi N Tuesday, September 6, 2011 2:58 PM
    • Marked as answer by KJian_ Wednesday, September 7, 2011 7:13 AM
    Tuesday, August 30, 2011 9:24 PM
  • As stated above, stored procedures are the best way to go for many reasons. Articles:

    Benefits of Using SQL Server Stored Procedures with Visual Basic and Web Applications By Alison Balter

    SQL Server Stored Procedures By Mike Chapple

     

    Stored procedure examples: http://bit.ly/pXcPy0


    Kalman Toth, SQL Server & Business Intelligence Training; sqlusa.com
    • Proposed as answer by Naomi N Tuesday, September 6, 2011 2:58 PM
    • Marked as answer by KJian_ Wednesday, September 7, 2011 7:13 AM
    Tuesday, September 6, 2011 2:43 PM