This discussion is archived
1 Reply Latest reply: Jan 5, 2012 6:30 AM by 894085 RSS

Query for billions of records fails with EOF error

user4928701 Newbie
Currently Being Moderated
I have a table with 5 billion records and I'm issuing the following query using OCI api OCIStmtExecute:

SELECT "SESSION_ID" AS "ColumnValue@@@",COUNT(*) AS "VALUE_FREQ_@@@" FROM "ALL_UNIQUE_5BILLION" GROUP BY "SESSION_ID" ORDER BY 2 DESC, 1 ASC

The OCI api returns -1. The OCIErrorGet api called right after returns only an empty text for the error message. I turned on Oracle Net Configuration client tracing, and in the trace file I see the message after my select query:

(10796) [16-DEC-2011 18:30:43:655] ntt2err: Read unexpected EOF ERROR on 22676
(10796) [16-DEC-2011 18:30:43:655] ntt2err: exit
(10796) [16-DEC-2011 18:30:43:655] nttfprd: exit
(10796) [16-DEC-2011 18:30:43:655] nserror: entry
(10796) [16-DEC-2011 18:30:43:655] nserror: nsres: id=0, op=68, ns=12537, ns2=12560; nt[0]=507, nt[1]=0, nt[2]=0; ora[0]=0, ora[1]=0, ora[2]=0
(10796) [16-DEC-2011 18:30:43:655] nsbasic_brc: exit: oln=0, dln=0, tot=0, rc=-1
(10796) [16-DEC-2011 18:30:43:655] nioqer: entry
(10796) [16-DEC-2011 18:30:43:655] nioqer: incoming err = 12151
(10796) [16-DEC-2011 18:30:43:655] nioqce: entry
(10796) [16-DEC-2011 18:30:43:655] nioqce: exit
(10796) [16-DEC-2011 18:30:43:655] nioqer: returning err = 3113
(10796) [16-DEC-2011 18:30:43:655] nioqer: exit
(10796) [16-DEC-2011 18:30:43:655] nioqrc: exit
(10796) [16-DEC-2011 18:30:43:655] nioqds: entry
(10796) [16-DEC-2011 18:30:43:655] nioqds: disconnecting...

Why does it end the channel? Is this by design? It is not due to network disconnection, as this is inside company LAN and this problem happens every time.
The database server version is Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit
and I'm using a 11gr2 OCI Oracle client.

When I run the same query via the SQL Developer, I get the error
No more data to read from socket
Vendor code 17410Error at Line:1

after a while.
Please help.

Edited by: user4928701 on Dec 19, 2011 4:22 AM

Edited by: user4928701 on Dec 19, 2011 4:48 AM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points