IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Pet peeve on SQLServer
is that the temporary tables can have only 1 index (primary key takes that spot).
New Rarely use real temporary tables
Working in SQL Server I rarely used real temporary tables anyway.

In those few cases where I was writing a stored procedure so complex I had to use a temporary table to hold a partial result, it was so complex I wanted to keep the partial results so I could trace my process backwards.

Jay
New I just finished writing about 15 stored procedures.
Where I heavily used temporary tables. Why? Because I was given an impossible deadline with incomplete specs that kept changing (here are some Access queries, replicate them in T-Sql and have it done by the end of today (4 hours). So, 40+ MS Access queries got condensed to 15 sp's - but 20+ of the Access queries were "Make Table" queries, so, well, you know). I typically try to avoid temp tables as well. Here's what my fear is: the design of these sp's is atrocious (I am geniunely ashamed that I wrote them) and I fear I will never be given the time to go back, look at the idiocy of the requirements I was given and write clean T-Sql that provides the required output with much less lunacy than was in the original design of the Access queries. My guess is that if I were granted that time, I probably wouldn't have to use any temp tables at all.

That said, I wonder if you or Chris have made much use of "table variables". I haven't really any experience with them. I have a sense of the limitations, but was wondering how you liked them.

bcnu,
Mikem
New Table variables are great
They run faster since they don't use logging (no transaction overhead). Just wish they'd taken the next logical step and allow you to pass them as a parameter to another procedure. Means that all the processing on the Table Variable has to be inside one procedure - making modularity hard to accomplish.
New Thanks.
If I ever get time to re-design the mess I've made, I'll give them a whirl.
     Slow query needs optimizing - (tangaroa) - (19)
         Re: Slow query needs optimizing - (pwhysall) - (3)
             Just imagine a Beowolf cluster of those. -NT - (ChrisR) - (2)
                 Great, now we're turning into /. - (inthane-chan)
                 Running DOSiX! -NT - (Another Scott)
         Can you post - (jbrabeck) - (6)
             'fraid not - (tangaroa) - (5)
                 pump to file, cat file |sort -k3 >outputfile - (boxley)
                 If you're allowed correlated subquery, then: - (morganek) - (1)
                     Re: If you're allowed correlated subquery, then: - (tangaroa)
                 Re: 'fraid not - (JayMehaffey) - (1)
                     Is "SQL Sever" intentional? (Regardless, I like it. :-) -NT - (ben_tilly)
         I don't recognize the "within" clause - (ben_tilly)
         Not quite sure what you are doing - (JayMehaffey) - (6)
             Whew, glad it's not just me that didn't understand. -NT - (jbrabeck)
             Pet peeve on SQLServer - (ChrisR) - (4)
                 Rarely use real temporary tables - (JayMehaffey) - (3)
                     I just finished writing about 15 stored procedures. - (mmoffitt) - (2)
                         Table variables are great - (ChrisR) - (1)
                             Thanks. - (mmoffitt)

We look. Often we do not see. Only rarely do we see fully.
91 ms