Click here to Skip to main content
15,913,722 members
Home / Discussions / Database
   

Database

 
GeneralLinq to SQL - Writing a generic "GetObjectFromId" method Pin
Dominic Pettifer10-Jan-08 5:20
Dominic Pettifer10-Jan-08 5:20 
GeneralRe: Linq to SQL - Writing a generic "GetObjectFromId" method Pin
Mark Churchill10-Jan-08 13:15
Mark Churchill10-Jan-08 13:15 
GeneralRe: Linq to SQL - Writing a generic "GetObjectFromId" method Pin
Pete O'Hanlon10-Jan-08 21:43
mvePete O'Hanlon10-Jan-08 21:43 
GeneralRe: Linq to SQL - Writing a generic "GetObjectFromId" method Pin
Mark Churchill12-Jan-08 4:30
Mark Churchill12-Jan-08 4:30 
GeneralConditional Index Usage Pin
gnjunge10-Jan-08 3:40
gnjunge10-Jan-08 3:40 
GeneralRe: Conditional Index Usage Pin
Dave-B10-Jan-08 5:18
Dave-B10-Jan-08 5:18 
GeneralRe: Conditional Index Usage Pin
gnjunge10-Jan-08 5:40
gnjunge10-Jan-08 5:40 
GeneralRe: Conditional Index Usage Pin
GuyThiebaut10-Jan-08 5:48
professionalGuyThiebaut10-Jan-08 5:48 
What I have been taught and understand about SQL Server is this:

Let it decide on what indexes to use on the basis that 'SQL Server knows best'.
Sometimes SQL Server will decide to do a table scan; as in some cases this is faster than what appears to be the correct index.

There will be others out there who know a lot more than me about this.

So basically set your indexes up and trust SQL to pick the most appropriate use of indexes (after all the database engine is designed precisely for this reason).

I was taught not to use the
gnjunge wrote:
WITH(INDEX XXXX)

for this reason.


Regards


Guy

You always pass failure on the way to success.


GeneralRe: Conditional Index Usage Pin
gnjunge10-Jan-08 6:07
gnjunge10-Jan-08 6:07 
AnswerRe: Conditional Index Usage Pin
GuyThiebaut10-Jan-08 7:46
professionalGuyThiebaut10-Jan-08 7:46 
GeneralRe: Conditional Index Usage Pin
gnjunge10-Jan-08 19:14
gnjunge10-Jan-08 19:14 
GeneralRe: Conditional Index Usage Pin
Dave-B10-Jan-08 21:53
Dave-B10-Jan-08 21:53 
GeneralRe: Conditional Index Usage Pin
gnjunge10-Jan-08 22:59
gnjunge10-Jan-08 22:59 
GeneralRe: Conditional Index Usage Pin
gnjunge12-Jan-08 23:34
gnjunge12-Jan-08 23:34 
GeneralRe: Conditional Index Usage Pin
GuyThiebaut10-Jan-08 22:17
professionalGuyThiebaut10-Jan-08 22:17 
GeneralSQL database create Pin
topcatalpha9-Jan-08 23:34
topcatalpha9-Jan-08 23:34 
GeneralRe: SQL database create Pin
topcatalpha10-Jan-08 0:30
topcatalpha10-Jan-08 0:30 
QuestionError:An error has occurred while establishing a connection to the server Pin
My Article9-Jan-08 23:31
My Article9-Jan-08 23:31 
GeneralRe: Error:An error has occurred while establishing a connection to the server Pin
pmarfleet10-Jan-08 4:29
pmarfleet10-Jan-08 4:29 
GeneralRe: Error:An error has occurred while establishing a connection to the server Pin
My Article10-Jan-08 17:21
My Article10-Jan-08 17:21 
GeneralRe: Error:An error has occurred while establishing a connection to the server Pin
pmarfleet10-Jan-08 21:57
pmarfleet10-Jan-08 21:57 
GeneralCount of non null columns in a row Pin
bhanu123459-Jan-08 18:55
bhanu123459-Jan-08 18:55 
GeneralRe: Count of non null columns in a row Pin
pmarfleet9-Jan-08 21:46
pmarfleet9-Jan-08 21:46 
GeneralRe: Count of non null columns in a row [modified] Pin
Dave-B10-Jan-08 5:08
Dave-B10-Jan-08 5:08 
GeneralSQL Injection Pin
Ritesh12349-Jan-08 12:48
Ritesh12349-Jan-08 12:48 

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.