Re: script to generate TEMP tablespace READS?

  • From: Jared Still <jkstill@xxxxxxxxx>
  • To: Christopher.Taylor2@xxxxxxxxxxxx
  • Date: Tue, 6 Nov 2012 08:19:52 -0800

On Tue, Nov 6, 2012 at 7:11 AM, <Christopher.Taylor2@xxxxxxxxxxxx> wrote:
> I need a test script to generate TEMP tablespace READS - I'm able to
> generate writes but I'm not getting any reads (or very few).
> Anyone have a simple script to do that?
>
> The reason for this is to test the filesystem/san throughput down the path
> where the temp tablespace tempfiles reside.
>
>
>
Here's an example of using subquery factoring for that:

Just set the rownum  comparison to a larger value for sustained reads

set serveroutput off

with dd as (
  select /*+ materialize */ * from dba_objects
)
select a.*
from dd a, dd b
where rownum <= 1000;

select *
from table(dbms_xplan.display_cursor( null,null,'ALL ALLSTATS LAST'));


Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist
Oracle Blog: http://jkstill.blogspot.com
Home Page: http://jaredstill.com


--
//www.freelists.org/webpage/oracle-l


Other related posts: