tag:blogger.com,1999:blog-5485181488522668586.post8529435621205246605..comments2024-02-21T07:46:27.287-05:00Comments on SQLBalls: Can You Compress a Temp Table?Bradley Ballhttp://www.blogger.com/profile/08229829101131724200noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-5485181488522668586.post-34016927809715891712015-12-02T10:27:58.636-05:002015-12-02T10:27:58.636-05:00I have a question about using already compressed t...I have a question about using already compressed table in user DB. If I use temp tables does the compression from the already compressed table carry over to the temp table created or does the compression only stay in memory and to have it remain compressed I would have to create the temp table as compressed to take advantage of compression.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5485181488522668586.post-50818502127212896272013-10-19T09:19:04.790-04:002013-10-19T09:19:04.790-04:00Hey Jeff! I have not done a lot of testing on thi...Hey Jeff! I have not done a lot of testing on this, but I will. Bradley Ballhttps://www.blogger.com/profile/08229829101131724200noreply@blogger.comtag:blogger.com,1999:blog-5485181488522668586.post-51404679618455225562013-09-26T17:30:08.531-04:002013-09-26T17:30:08.531-04:00I guess the same won't apply to table variable...I guess the same won't apply to table variable. Have to find some time to try out.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5485181488522668586.post-12608859582218197962013-09-26T10:39:40.485-04:002013-09-26T10:39:40.485-04:00Compression of a Temp Table seems like it could be...Compression of a Temp Table seems like it could be useful. Have you done any testing to see how much of a difference it would make performance wise?Jeff Modennoreply@blogger.comtag:blogger.com,1999:blog-5485181488522668586.post-52343623368437902452013-09-26T10:35:41.304-04:002013-09-26T10:35:41.304-04:00That still has the problem of being RBAR because i...That still has the problem of being RBAR because it's still going to do 5,000 individual inserts. It doesn't matter so much with a tiny test table like this but it will matter when you're doing repeated tests where you need to rebuild the test table over and over with a million or two rows.Jeff Modennoreply@blogger.comtag:blogger.com,1999:blog-5485181488522668586.post-26945726365930919332013-09-26T09:51:28.991-04:002013-09-26T09:51:28.991-04:00btw, instead of that loop try:
insert into #myTa...btw, instead of that loop try:<br /> insert into #myTable1 default values;<br /> go 5000;Anonymousnoreply@blogger.com