Re: cheapest way to access every 15th row in table ordered by timestamp column
- From: Gints Plivna <gints.plivna@xxxxxxxxx>
- To: Chris.Stephens@xxxxxxx
- Date: Wed, 19 Jan 2011 18:39:06 +0200
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
- References:
- cheapest way to access every 15th row in table ordered by timestamp column
- From: Stephens, Chris
- cheapest way to access every 15th row in table ordered by timestamp column
Other related posts:
- » cheapest way to access every 15th row in table ordered by timestamp column - Stephens, Chris
- » Re: cheapest way to access every 15th row in table ordered by timestamp column - Stephane Faroult
- » Re: cheapest way to access every 15th row in table ordered by timestamp column - Igor Neyman
- » RE: cheapest way to access every 15th row in table ordered by timestamp column - Dominic.Brooks
- » RE: cheapest way to access every 15th row in table ordered by timestamp column - Dominic.Brooks
- » RE: cheapest way to access every 15th row in table ordered by timestamp column - Stephens, Chris
- » Re: cheapest way to access every 15th row in table ordered by timestamp column - Gints Plivna
- » Re: cheapest way to access every 15th row in table ordered by timestamp column - Niall Litchfield
- » Re: cheapest way to access every 15th row in table ordered by timestamp column - Michael Moore
- » RE: cheapest way to access every 15th row in table ordered by timestamp column - Stephens, Chris
- » RE: cheapest way to access every 15th row in table ordered by timestamp column - Stephens, Chris
- » Re: cheapest way to access every 15th row in table ordered by timestamp column - Slim Dave
- » Re: cheapest way to access every 15th row in table ordered by timestamp column - Subodh Deshpande