Partiton RDBMS ( DB2 ) table data either by SQL query or Java -


i have implement partitioning column data ( column name : id ) large database table ( db2 ). table has more billion rows , keeps growing.

partitioning has implemented illustrated here i.e. have calculate minid & maxid specified range.

id column values unique not sequential simple approach illustrated in above link not work - i.e. starting id keep adding range.

with rownumtab (   select rownum, id (     select rownumber() on (order id) rownum, id     idtable    )   mod(rownum,1000)=0 or mod(rownum,1000)=1  ur   )   select t1.id min_id  , t2.id max_id  rownumtab t1  inner join rownumtab t2    on t1.rownum+999=t2.rownum  ur; 

this above query gives me min_id,max_id particular range - 1000.

this query works small tables large table having few billion rows, assigning row number each row not completing in realistic time.

any alternate suggestions achieve kind of partitioning?

challenge described here too.

reading id values memory doing java manipulation not feasible option either.

please suggest.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -