Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jung1975
Aged Yak Warrior
503 Posts |
Posted - 2003-09-10 : 11:53:44
|
| As far as the performance aspect, which one is the better choice?.( view or temp table)Jung |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-09-10 : 19:27:41
|
| Which car is faster, a Ferrari or a Lamborghini? It depends on the circumstances. Neither one is always faster or better than the other.If you post more details about what you're trying to do, we might be better able to answer, but it the end it all comes down to: test both approaches and see which one works better for you. |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2003-09-10 : 20:21:52
|
| I agree with Rob, we need to see more details. I'd guess that a view is "better" because with a Temp Table you have to populate it and then select from it. A View selects from tables that already exist.On the other hand, if the view is looking at more data than the temp table, the temp table may be faster.You may also want to investigate Table Variables. They are an in-memory temp table.Michael<Yoda>Use the Search page you must. Find the answer you will.</Yoda> |
 |
|
|
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2003-09-11 : 06:52:19
|
quote: Originally posted by robvolk Which car is faster, a Ferrari or a Lamborghini?
Lamborghini D'oh!__________________Make love not war! |
 |
|
|
|
|
|