tag:blogger.com,1999:blog-4677316190423110840.post2367403130222391514..comments2008-03-27T21:51:06.799+01:00Comments on Software Engineer Thoughts: Which Temporary Tablespace is used for sorts?Paweł Baruthttp://www.blogger.com/profile/16867021334037413869noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-4677316190423110840.post-47364918835921656712008-03-27T21:51:00.000+01:002008-03-27T21:51:00.000+01:00Hi Gary,This is very good question. I did:1. run q...Hi Gary,<BR/><BR/>This is very good question. I did:<BR/>1. run query - used TEMP_A<BR/>2. altered user - assigned tablespace TEMP_A<BR/>3. run exactly same query - used TEMP_B<BR/><BR/>Same thing happened when query was embedded in PL/SQL stored procedure.<BR/><BR/>Statistics from v$sql:<BR/>loaded_versions = 1<BR/>loads = 1<BR/>executions = 2<BR/>invalidations = 0<BR/>parse_calls = 2<BR/><BR/>/PawełPaweł Baruthttp://www.blogger.com/profile/16867021334037413869noreply@blogger.comtag:blogger.com,1999:blog-4677316190423110840.post-75858887176260689372008-03-25T22:44:00.000+01:002008-03-25T22:44:00.000+01:00Given it appears that temporary tablespace is base...Given it appears that temporary tablespace is based on the schema used to parse the query, I wonder if it is built into the optimizer plan.<BR/>If you changed a user's temporary tablespace, would a cached SQL still use the original temporary tablespace setting ? Not something that is likely to happen often, I guess.Gary Myershttp://www.blogger.com/profile/08828771074492585943noreply@blogger.com