Home » Community » Newbie corner » A trouble with "select" from Oracle DB
Re: A trouble with "select" from Oracle DB [message #29405 is a reply to message #29396] |
Tue, 19 October 2010 10:02 |
|
I tested with 193066 rows without any problem.
The code:
Oracle8 oracle_conn;
String result;
TimeStop v_timer;
if(oracle_conn.Login("user", "password", "host:port/SID", true)){
result << "\n connection time: " << v_timer;
v_timer.Reset();
Sql sql(oracle_conn);
sql.Execute("select count(*) from AP_INVOICES_ALL");
while(sql.Fetch())
result << "\n total rows: " << sql[0];
result << ", timer: " << v_timer;
v_timer.Reset();
sql.Execute("select INVOICE_ID, INVOICE_DATE from AP_INVOICES_ALL");
int i = 0;
while(sql.Fetch()){
++i;
result << "\n" << i << ". " << sql[0] << " - " << sql[1];
}
result << ", timer: " << v_timer;
v_timer.Reset();
}else
result << "error to connect";
and output:
Quote: |
connection time: 0.312
total rows: 193066, timer: 0.047
1. 10000 - 12/31/1998
2. 10001 - 12/31/1998
3. 10002 - 12/31/1998
4. 10003 - 12/31/1998
5. 10004 - 12/31/1998
6. 10005 - 12/31/1998
......................
193065. 246828 - 07/01/2010
193066. 246897 - 07/30/2010, timer: 9.781
|
Result:
1. the problem can be with your oracle DB
2. or if you run the code in terminal then you can see only last 3XX rows.
Best Regards,
Ion Lupascu(tojocky).
Added: Oracle DB: 10.2.0.4
Server: Linux RedHat 4
Client: Windows XP SP3.
Tested with string columns - no problems!
[Updated on: Tue, 19 October 2010 10:15] Report message to a moderator
|
|
|
|
|
A trouble with "select" from Oracle DB
By: porto on Mon, 18 October 2010 15:52
|
|
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 09:28
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 09:43
|
|
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 10:02
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 10:35
|
|
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 10:46
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 10:53
|
|
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 11:33
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 13:15
|
|
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 13:35
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 13:53
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 14:28
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 14:44
|
|
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 15:15
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 15:34
|
|
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 16:21
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 16:31
|
|
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Tue, 19 October 2010 17:00
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Tue, 19 October 2010 17:14
|
|
|
Re: A trouble with "select" from Oracle DB
By: tojocky on Wed, 20 October 2010 09:15
|
|
|
Re: A trouble with "select" from Oracle DB
By: porto on Wed, 20 October 2010 09:54
|
Goto Forum:
Current Time: Wed May 15 02:50:16 CEST 2024
Total time taken to generate the page: 0.02999 seconds
|