Hi
I am using oracle 12.1.0.2
My following query has close to 10 Million records. I need to write the output in text file. What will be the best way to unload this data quickly either in csv or json format?
select
a.product_id,
c.product_name,
a.sensordatavalue,
to_char(trunc(a.receivedtime),'DD-MM-YYYY HH24:MI:SS') as recd
to_char(trunc(a.receivedtime),'YYYY') AS recd_yr,
to_char(trunc(a.receivedtime),'YYYY"-Q"Q') AS recd_qtr,
to_char(trunc(a.receivedtime),'YYYY"-M"MM') AS recd_month,
to_char(trunc(a.receivedtime),'YYYYMMDD') AS recd_day
from
data a,
product d
where
a.product_id = d.product_id and
and a.receivedtime between to_date('01/01/2016','DD/MM/YYYY') and to_date('31/10/2016', 'DD/MM/YYYY');
Thanks