- Moderator
- #1
I'm looking at some of our "legacy" SQL queries. They're painful.
One of the things that is being done is a RBAR copy of a subset of fields into a temporary table. Part of the reason it's doing the copy to the temp table is because it renames columns... Needless to say, that is very slow (and it's happening a LOT in this routine.. EOM.)
So, I was thinking to myself, and I said "Self, would a VIEW of that subset be faster? What are the costs of maintaining a view that would only be used once a month?"
Then I thought of you fine folks... and figured you probably knew the answer for that.
Thanks in advance!
Just my $.02
"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."
--Greg
One of the things that is being done is a RBAR copy of a subset of fields into a temporary table. Part of the reason it's doing the copy to the temp table is because it renames columns... Needless to say, that is very slow (and it's happening a LOT in this routine.. EOM.)
So, I was thinking to myself, and I said "Self, would a VIEW of that subset be faster? What are the costs of maintaining a view that would only be used once a month?"
Then I thought of you fine folks... and figured you probably knew the answer for that.
Thanks in advance!
Just my $.02
"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."
--Greg