Click here to Skip to main content
15,908,455 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralMessage Removed Pin
20-Jun-14 4:40
mohammed shihab20-Jun-14 4:40 
GeneralMessage Removed Pin
20-Jun-14 4:48
professional dan!sh 20-Jun-14 4:48 
GeneralMessage Removed Pin
20-Jun-14 4:54
professional#realJSOP20-Jun-14 4:54 
GeneralDiscoveries Pin
#realJSOP20-Jun-14 4:08
professional#realJSOP20-Jun-14 4:08 
GeneralRe: Discoveries Pin
JMK-NI20-Jun-14 4:14
professionalJMK-NI20-Jun-14 4:14 
GeneralRe: Discoveries Pin
PIEBALDconsult20-Jun-14 4:16
mvePIEBALDconsult20-Jun-14 4:16 
GeneralRe: Discoveries Pin
Pualee20-Jun-14 4:20
Pualee20-Jun-14 4:20 
GeneralRe: Discoveries Pin
Richard Deeming20-Jun-14 4:32
mveRichard Deeming20-Jun-14 4:32 
John Simmons / outlaw programmer wrote:
I encountered a view that has 519 OR clauses that evaluate the value of 20 columns. When run in its original form, it took 11 seconds to execute and returns 2900 rows. I modified it to declare a varchar variable and then called CHARINDEX for each column one time, and execution time is now < 1 second.

Congratulations - you've just ensured that SQL won't be able to use an index on any those columns to process your query! Poke tongue | ;-P



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: Discoveries Pin
#realJSOP20-Jun-14 4:53
professional#realJSOP20-Jun-14 4:53 
GeneralRe: Discoveries Pin
Tim Carmichael20-Jun-14 5:41
Tim Carmichael20-Jun-14 5:41 
GeneralRe: Discoveries Pin
Dan Neely20-Jun-14 5:41
Dan Neely20-Jun-14 5:41 
GeneralRe: Discoveries Pin
newton.saber20-Jun-14 5:52
newton.saber20-Jun-14 5:52 
GeneralRe: Discoveries Pin
Sander Rossel20-Jun-14 7:40
professionalSander Rossel20-Jun-14 7:40 
GeneralI didn't realize this law was necessary Pin
Kschuler20-Jun-14 3:44
Kschuler20-Jun-14 3:44 
GeneralRe: I didn't realize this law was necessary Pin
OriginalGriff20-Jun-14 4:11
mveOriginalGriff20-Jun-14 4:11 
GeneralRe: I didn't realize this law was necessary Pin
Pualee20-Jun-14 4:23
Pualee20-Jun-14 4:23 
GeneralRe: I didn't realize this law was necessary PinPopular
PapaCraft20-Jun-14 4:38
PapaCraft20-Jun-14 4:38 
GeneralRe: I didn't realize this law was necessary Pin
Deflinek20-Jun-14 6:46
Deflinek20-Jun-14 6:46 
GeneralRe: I didn't realize this law was necessary Pin
Bergholt Stuttley Johnson20-Jun-14 4:55
professionalBergholt Stuttley Johnson20-Jun-14 4:55 
GeneralRe: I didn't realize this law was necessary Pin
Maarten Kools20-Jun-14 5:14
professionalMaarten Kools20-Jun-14 5:14 
GeneralRe: I didn't realize this law was necessary Pin
Ian Shlasko20-Jun-14 5:14
Ian Shlasko20-Jun-14 5:14 
GeneralRe: I didn't realize this law was necessary Pin
JimmyRopes20-Jun-14 6:17
professionalJimmyRopes20-Jun-14 6:17 
GeneralRe: I didn't realize this law was necessary Pin
bling20-Jun-14 6:25
bling20-Jun-14 6:25 
GeneralRe: I didn't realize this law was necessary Pin
PIEBALDconsult20-Jun-14 7:49
mvePIEBALDconsult20-Jun-14 7:49 
GeneralRe: I didn't realize this law was necessary Pin
Ian Shlasko20-Jun-14 8:17
Ian Shlasko20-Jun-14 8:17 

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.