Re: script to generate TEMP tablespace READS?

From: Jared Still <jkstill_at_gmail.com>
Date: Tue, 6 Nov 2012 08:19:52 -0800
Message-ID: <CAORjz=O92UhvMmMoqkwJgtWLmHMKxqMt0kqJifwguQP9MQXp+A_at_mail.gmail.com>



On Tue, Nov 6, 2012 at 7:11 AM, <Christopher.Taylor2_at_parallon.net> 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

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Nov 06 2012 - 17:19:52 CET

Original text of this message