Click here to Skip to main content
15,912,329 members
Home / Discussions / Database
   

Database

 
GeneralRe: Backup database is terminating abnormally Pin
Eddy Vluggen3-Nov-08 2:05
professionalEddy Vluggen3-Nov-08 2:05 
GeneralRe: Backup database is terminating abnormally Pin
sunil goyalG3-Nov-08 2:13
sunil goyalG3-Nov-08 2:13 
QuestionRe: Backup database is terminating abnormally Pin
Eddy Vluggen3-Nov-08 2:32
professionalEddy Vluggen3-Nov-08 2:32 
AnswerRe: Backup database is terminating abnormally Pin
sunil goyalG3-Nov-08 2:38
sunil goyalG3-Nov-08 2:38 
QuestionImporting data in SQL table from .csv file Pin
preetpal2-Nov-08 19:45
preetpal2-Nov-08 19:45 
AnswerRe: Importing data in SQL table from .csv file Pin
Wendelius5-Nov-08 10:47
mentorWendelius5-Nov-08 10:47 
AnswerRe: Importing data in SQL table from .csv file Pin
Muditha Dissanayake6-Nov-08 4:43
Muditha Dissanayake6-Nov-08 4:43 
QuestionDo Subsonic Generates Stored Procedure for US? Pin
bilal haider2-Nov-08 18:12
bilal haider2-Nov-08 18:12 
AnswerRe: Do Subsonic Generates Stored Procedure for US? Pin
Ashfield2-Nov-08 20:00
Ashfield2-Nov-08 20:00 
QuestionNoise words problem in Full text indexing Pin
Member 44701452-Nov-08 10:42
Member 44701452-Nov-08 10:42 
RantRe: Noise words problem in Full text indexing Pin
Eddy Vluggen2-Nov-08 23:19
professionalEddy Vluggen2-Nov-08 23:19 
QuestionBLOBS Pin
Elizma2-Nov-08 6:07
Elizma2-Nov-08 6:07 
AnswerRe: BLOBS Pin
Wendelius2-Nov-08 6:21
mentorWendelius2-Nov-08 6:21 
QuestionHow to move data from local database to web server database? Pin
kandalu1-Nov-08 20:38
kandalu1-Nov-08 20:38 
AnswerRe: How to move data from local database to web server database? Pin
Wendelius2-Nov-08 0:01
mentorWendelius2-Nov-08 0:01 
QuestionWhere can I download SQL Server 2000 Books Online (SQL BOL)? Pin
Rameez Raja1-Nov-08 19:36
Rameez Raja1-Nov-08 19:36 
AnswerRe: Where can I download SQL Server 2000 Books Online (SQL BOL)? Pin
Wendelius1-Nov-08 21:44
mentorWendelius1-Nov-08 21:44 
QuestionIs there a better solution to check today's record? Pin
lingerpop1-Nov-08 19:18
lingerpop1-Nov-08 19:18 
AnswerRe: Is there a better solution to check today's record? Pin
Wendelius1-Nov-08 21:52
mentorWendelius1-Nov-08 21:52 
QuestionConversion from varchar data type into datetime in sql server 2000 Pin
Rameez Raja1-Nov-08 19:10
Rameez Raja1-Nov-08 19:10 
AnswerRe: Conversion from varchar data type into datetime in sql server 2000 Pin
Wendelius1-Nov-08 21:32
mentorWendelius1-Nov-08 21:32 
QuestionUsing Stored Procedure or View in the following scenario Pin
ashwanigl1-Nov-08 17:47
ashwanigl1-Nov-08 17:47 
AnswerRe: Using Stored Procedure or View in the following scenario Pin
Wendelius1-Nov-08 22:21
mentorWendelius1-Nov-08 22:21 
Since you have to execute the select statement somewhere, view is not a bad option at all. Basically it's only a stored version of the statement. If you compare the same query inside a view or stored procedure, there's no difference in execution. However, if stored procedure is created using cursors, the stored procedure will be much slower and inefficient.

If you build complex queries over the view, there may be problems for the optimizer to find a good plan. For example, so called predicate pushing may not always be possible. For this reason most of the logic in the statement should be put into the query in the view (if possible).

Another area you should consider is data modifications. Fetching the data through a view is a simple and efficient process, but how are the modifications done. Is the application executing delete, insert and update against the view or do DML statements use another path to the data. When using views there are lots of restrictions that cause the view not to be updatable anymore. For example, joining in view and deleting against the view. Should all the rows be deleted in joined tables or not. You can use INSTEAD OF triggers to overcome these limitations.

Hope this helps,

Mika

The need to optimize rises from a bad design.

My articles[^]

GeneralRe: Using Stored Procedure or View in the following scenario Pin
ashwanigl2-Nov-08 1:29
ashwanigl2-Nov-08 1:29 
GeneralRe: Using Stored Procedure or View in the following scenario Pin
Wendelius2-Nov-08 1:31
mentorWendelius2-Nov-08 1:31 

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.