Click here to Skip to main content
15,887,596 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Update Pin
Mycroft Holmes29-Jan-13 12:09
professionalMycroft Holmes29-Jan-13 12:09 
GeneralRe: SQL Update Pin
mrfalk29-Jan-13 12:17
mrfalk29-Jan-13 12:17 
GeneralRe: SQL Update Pin
PIEBALDconsult29-Jan-13 12:27
mvePIEBALDconsult29-Jan-13 12:27 
GeneralRe: SQL Update Pin
Mycroft Holmes29-Jan-13 13:49
professionalMycroft Holmes29-Jan-13 13:49 
GeneralRe: SQL Update Pin
PIEBALDconsult29-Jan-13 12:20
mvePIEBALDconsult29-Jan-13 12:20 
GeneralRe: SQL Update Pin
Mycroft Holmes29-Jan-13 13:54
professionalMycroft Holmes29-Jan-13 13:54 
GeneralRe: SQL Update Pin
jschell29-Jan-13 14:13
jschell29-Jan-13 14:13 
GeneralRe: SQL Update Pin
Michael Potter30-Jan-13 4:28
Michael Potter30-Jan-13 4:28 
PIEBALDconsult wrote:
Won't that rescan the table/index for each id?


Yes. You could load up a temp table (Emp_id, date) and then join the update to the temp table. It would lower the lookups by a 5th at the cost increasing the code complexity.

For something that will run once, I think the clarity of the correlated sub-query overrides any benefit on time. Of course, if we are talking gigabyte tables, I take it all back.
GeneralRe: SQL Update Pin
PIEBALDconsult30-Jan-13 5:05
mvePIEBALDconsult30-Jan-13 5:05 
GeneralRe: SQL Update Pin
jschell30-Jan-13 7:58
jschell30-Jan-13 7:58 
GeneralRe: SQL Update Pin
PIEBALDconsult30-Jan-13 8:40
mvePIEBALDconsult30-Jan-13 8:40 
GeneralRe: SQL Update Pin
Michael Potter31-Jan-13 3:57
Michael Potter31-Jan-13 3:57 
GeneralRe: SQL Update Pin
PIEBALDconsult31-Jan-13 4:05
mvePIEBALDconsult31-Jan-13 4:05 
GeneralRe: SQL Update Pin
jschell31-Jan-13 8:01
jschell31-Jan-13 8:01 
AnswerRe: SQL Update Pin
PIEBALDconsult29-Jan-13 13:22
mvePIEBALDconsult29-Jan-13 13:22 
AnswerRe: SQL Update Pin
Jörgen Andersson30-Jan-13 1:21
professionalJörgen Andersson30-Jan-13 1:21 
AnswerRe: SQL Update Pin
mrfalk30-Jan-13 6:20
mrfalk30-Jan-13 6:20 
QuestionDatabase backup size Pin
savbace28-Jan-13 22:45
savbace28-Jan-13 22:45 
AnswerRe: Database backup size Pin
Richard Deeming29-Jan-13 1:21
mveRichard Deeming29-Jan-13 1:21 
QuestionSQL Server 2005 Express running slow ? Pin
Member 245846728-Jan-13 15:56
Member 245846728-Jan-13 15:56 
AnswerRe: SQL Server 2005 Express running slow ? Pin
PIEBALDconsult28-Jan-13 16:11
mvePIEBALDconsult28-Jan-13 16:11 
AnswerRe: SQL Server 2005 Express running slow ? Pin
Mycroft Holmes28-Jan-13 17:02
professionalMycroft Holmes28-Jan-13 17:02 
AnswerRe: SQL Server 2005 Express running slow ? Pin
JOAT-MON29-Jan-13 11:09
JOAT-MON29-Jan-13 11:09 
QuestionCombining Data From Temp Tables Pin
Matt U.28-Jan-13 8:46
Matt U.28-Jan-13 8:46 
AnswerRe: Combining Data From Temp Tables Pin
David Mujica28-Jan-13 9:13
David Mujica28-Jan-13 9:13 

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.