Does the environment for extracting the WKT coordinates matter? The 'C' library callin the ArcSDE API does the job way faster than Oracle can toss around LOBs.D:\>sdequery -l rnd200k,shape -E -45,-45,45,45 -C shape -d setk.txt
ArcSDE 10.2 Generic Query Tool Wed Aug 28 09:21:02 2013
------------------------------------------------------------------------
24885 rows found in 1.12 secs
D:\>sdequery -l rnd200k,shape -E -45,-45,45,45 -C shape -d setk.txt:REPLACE
ArcSDE 10.2 Generic Query Tool Wed Aug 28 09:21:13 2013
------------------------------------------------------------------------
24885 rows found in 421.00 ms
D:\>sdequery -l rnd200k,shape -E -45,-45,45,45 -C "sde.st_astext(shape) wkt" -d stfn.txt -v
ArcSDE 10.2 Generic Query Tool Wed Aug 28 09:21:53 2013
------------------------------------------------------------------------
24885 rows found in 49.94 secs
D:\>sdequery -l rnd200k,shape -E -45,-45,45,45 -C "sde.st_astext(shape) wkt" -d stfn.txt:REPLACE -v
ArcSDE 10.2 Generic Query Tool Wed Aug 28 09:22:58 2013
------------------------------------------------------------------------
24885 rows found in 50.66 secs
It also makes a slightly smaller file:D:\>head setk.txt stfn.txt
==> setk.txt <==
shape
POINT ( -44.95012200 -43.16230800)
POINT ( -44.75976100 -40.27963900)
POINT ( -44.69895400 -41.67931700)
POINT ( -44.68343000 -40.18468300)
POINT ( -44.54161900 -35.92863400)
POINT ( -44.68887400 -32.18295800)
POINT ( -44.14273600 -32.20899500)
POINT ( -44.93447300 -29.87766500)
POINT ( -44.22238600 -28.60796900)
==> stfn.txt <==
wkt
POINT ( -44.95012200 -43.16230800)
POINT ( -44.75976100 -40.27963900)
POINT ( -44.69895400 -41.67931700)
POINT ( -44.68343000 -40.18468300)
POINT ( -44.54161900 -35.92863400)
POINT ( -44.68887400 -32.18295800)
POINT ( -44.14273600 -32.20899500)
POINT ( -44.93447300 -29.87766500)
POINT ( -44.22238600 -28.60796900)
And 'sdequery' will let you search on geodetic buffers from the command line:
D:\>sdequery -l rnd200k,shape -F1 SM_II:geocircle:0,0,600nm -C shape -d buf.txt
ArcSDE 10.2 Generic Query Tool Wed Aug 28 09:55:02 2013
------------------------------------------------------------------------
934 rows found in 63.00 ms
though it would also accept the equivalent WHERE clause as well.- V