Re: cheapest way to access every 15th row in table ordered by timestamp column

Actually I cannot find anything "ordered by timestamp column"
If the order is not too critical then probably sample clause could work:
SQL> select count(*) from big_emp;

  COUNT(*)
----------
 126000000

SQL> select * from big_emp sample (0.000001);

     EMPNO ENAME      JOB              MGR HIREDATE          SAL       COMM
---------- ---------- --------- ---------- ---------- ---------- ----------
    DEPTNO
----------
  15401937 ALLEN      SALESMAN        7698 1981.02.20       1600        300
        30

  69587080 SCOTT      ANALYST         7566 1987.04.19       3000
        20

However it seems not to bee too reliable even in row numbers we get
back, because for sample  0.000002 I got 1, 2 and 4 rows back in
different executions.

Gints Plivna
http://www.gplivna.eu

2011/1/19 Stephens, Chris <Chris.Stephens@xxxxxxx>:
> They are requesting a view that picks out every 15th row of data going back
> 30 days.
>
--
http://www.freelists.org/webpage/oracle-l


Other related posts: