Click here to Skip to main content
15,916,378 members
Home / Discussions / Database
   

Database

 
QuestionDatabase Independent Application for Bulk Sale/ Distribution Pin
JayKhatri6-Mar-08 0:54
JayKhatri6-Mar-08 0:54 
GeneralRe: Database Independent Application for Bulk Sale/ Distribution Pin
GuyThiebaut6-Mar-08 1:22
professionalGuyThiebaut6-Mar-08 1:22 
GeneralField Expressions in Sql Server Reporting Srevices(SSRS)-2005.. Pin
Aswanth6-Mar-08 0:11
Aswanth6-Mar-08 0:11 
GeneralRe: Field Expressions in Sql Server Reporting Srevices(SSRS)-2005.. Pin
pmarfleet6-Mar-08 2:00
pmarfleet6-Mar-08 2:00 
GeneralRe: Field Expressions in Sql Server Reporting Srevices(SSRS)-2005.. Pin
Aswanth6-Mar-08 20:11
Aswanth6-Mar-08 20:11 
GeneralRe: Field Expressions in Sql Server Reporting Srevices(SSRS)-2005.. Pin
pmarfleet6-Mar-08 20:49
pmarfleet6-Mar-08 20:49 
Generalgeneralized/generic stored procedures Pin
mamatha_raghu6-Mar-08 0:08
mamatha_raghu6-Mar-08 0:08 
GeneralRe: generalized/generic stored procedures Pin
Mike Dimmick7-Mar-08 10:27
Mike Dimmick7-Mar-08 10:27 
It's a really, really bad idea. SQL Server will generate a query plan for the first set of parameters, cache it, and reuse it for all future calls to that stored procedure regardless of how the parameters change.

Stored procedures work best when the shape of the query - the tables involved, how they're joined, the columns filtered by the WHERE clause, and the order of the output - remains stable. They don't work if you try to change the shape of the query.

SQL Server accepts parameterized SQL text - with @variables in the command text - and it caches the query plans for parameterized queries. It also tries to automatically deduce where parameters should be if no parameters were used - this is referred to as auto-parameterization. It still caches the query plan even if it can't deduce the parameters. However, it ranks the cached query plans so that a plan for a stored procedure is likely to be kept longer than a parameterized query, which is likely to be kept longer than an auto-parameterized query, which in turn is likely to be kept longer than a non-parameterized query.

Unless you really want to prevent users from SELECTing from the base tables - using the security barrier you can erect using stored procedures - I strongly recommend using parameterized, dynamically-constructed queries submitted as text.


DoEvents: Generating unexpected recursion since 1991

GeneralUsing existed Database file. Pin
Hum Dum5-Mar-08 23:51
Hum Dum5-Mar-08 23:51 
GeneralRe: Using existed Database file. Pin
GuyThiebaut6-Mar-08 1:31
professionalGuyThiebaut6-Mar-08 1:31 
GeneralRe: Using existed Database file. Pin
Hum Dum6-Mar-08 19:59
Hum Dum6-Mar-08 19:59 
GeneralRe: Using existed Database file. Pin
GuyThiebaut6-Mar-08 20:26
professionalGuyThiebaut6-Mar-08 20:26 
QuestionSQL Query for getting IP address of SQL server [modified] Pin
Rajesh647275-Mar-08 22:37
Rajesh647275-Mar-08 22:37 
GeneralRe: SQL Query for getting IP address of SQL server Pin
Adeel Chaudhry22-Apr-08 0:08
Adeel Chaudhry22-Apr-08 0:08 
GeneralRe: SQL Query for getting IP address of SQL server Pin
Rajesh6472722-May-08 0:42
Rajesh6472722-May-08 0:42 
QuestionNEXT AND PREVIOUS RECORDS Pin
Sonia Gupta5-Mar-08 20:49
Sonia Gupta5-Mar-08 20:49 
GeneralRe: NEXT AND PREVIOUS RECORDS Pin
Colin Angus Mackay5-Mar-08 22:23
Colin Angus Mackay5-Mar-08 22:23 
GeneralRe: NEXT AND PREVIOUS RECORDS Pin
Pete O'Hanlon6-Mar-08 10:53
mvePete O'Hanlon6-Mar-08 10:53 
GeneralRe: NEXT AND PREVIOUS RECORDS Pin
martin_hughes6-Mar-08 11:53
martin_hughes6-Mar-08 11:53 
GeneralRe: NEXT AND PREVIOUS RECORDS Pin
Pete O'Hanlon6-Mar-08 21:56
mvePete O'Hanlon6-Mar-08 21:56 
Questionsql Pin
Member 47080775-Mar-08 20:00
Member 47080775-Mar-08 20:00 
GeneralRe: sql Pin
Giorgi Dalakishvili5-Mar-08 21:00
mentorGiorgi Dalakishvili5-Mar-08 21:00 
GeneralRe: sql Pin
Colin Angus Mackay5-Mar-08 22:18
Colin Angus Mackay5-Mar-08 22:18 
GeneralReporting Services--Stuck with Matrix column Pin
Payal_e_m5-Mar-08 19:12
Payal_e_m5-Mar-08 19:12 
GeneralIdentity Pin
Sebastian T Xavier5-Mar-08 18:59
Sebastian T Xavier5-Mar-08 18:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.