Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Query Optimization help Expand / Collapse
Author
Message
Posted Friday, October 11, 2013 11:44 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 31, 2014 7:48 PM
Points: 119, Visits: 494
Thanks for your replies...

I will consider all of the posts and replies..


Cheers,
- Win
"Dont Judge a Book by its Cover"
Post #1504110
Posted Saturday, October 19, 2013 12:32 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 31, 2014 7:48 PM
Points: 119, Visits: 494
I am Sorry for delayed reply...

I was away these many days.

Thanks for your help and options for better performance.
Yes, the job runs on Saturday & Sunday.


Cheers,
- Win
"Dont Judge a Book by its Cover"
Post #1506370
Posted Saturday, October 19, 2013 9:22 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 9:11 PM
Points: 20,861, Visits: 32,887
Not knowing what changes you made to your code I made a simple change, I moved your CTE pdtmstr into a select into statement to populate a temporary table called #pdtmstr. I then replaced the reference to the CTE with this temporary table.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)


  Post Attachments 
DB_Dolby_Alloc.txt (5 views, 8.75 KB)
Post #1506405
Posted Saturday, October 19, 2013 8:01 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 31, 2014 7:48 PM
Points: 119, Visits: 494
Great help...!

I am planning to test the changes and code in DEV environment tomorrow.
I made this query into a Procedure and it is running fine as of now.
I will use your changes as well.

Thanks much.. I will keep you updated. I will be back again on this..


Cheers,
- Win
"Dont Judge a Book by its Cover"
Post #1506429
Posted Saturday, October 19, 2013 10:25 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 7:27 AM
Points: 35,769, Visits: 32,437
- Win (10/11/2013)
Thanks for your replies...

I will consider all of the posts and replies..


I can only hope that's true.

Tell your company that it's no longer lawful to embed SSN's in Policy Numbers and that storing unencrypted SSN's in their databases can get them shut down.

Sheesh... and people bitch about the NSA violating privacy.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1506434
Posted Monday, October 21, 2013 7:06 PM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, October 31, 2014 7:48 PM
Points: 119, Visits: 494
Hello Jeff Moden,

Happy to see your response on this. I have couple of questions.

What do you mean ?
What should I understand with your response, the last lines ?

SSNs are encrypted and secured. Its a banking company and more over Trading.


Cheers,
- Win
"Dont Judge a Book by its Cover"
Post #1506943
Posted Tuesday, October 22, 2013 2:14 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 7:27 AM
Points: 35,769, Visits: 32,437
- Win (10/21/2013)
Hello Jeff Moden,

Happy to see your response on this. I have couple of questions.

What do you mean ?
What should I understand with your response, the last lines ?

SSNs are encrypted and secured. Its a banking company and more over Trading.


In the code that you attached, the SSNs go through several character based manipulations. That's not possible with encrypted data. It would appear that the SSNs aren't encrypted based on the code.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #1507358
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse