having slow access problem

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
AndyColson
Posts: 2
Joined: Sun 16 Apr 2006 20:46
Location: Iowa

having slow access problem

Post by AndyColson » Sun 16 Apr 2006 20:51

Hi All

I have a query that returns 1500 rows, using oledb it returns all rows in 0.8 seconds. using odac it takes 9 seconds.

There must be something I'm doing wrong, any hints?

Everything I've tried makes no difference. I'v played with:

TOraQuery: fetchAll, ReadOnly and UniDirectional.

I'm only interested in loading the data from the select statement. I set UniDirection and ReadOnly to true.

Is there a different component that would load faster?

Thanks,

-Andy

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Mon 17 Apr 2006 11:53

Please send to ODAC support address complete sample that demonstrates your problem and include script to create server objects.

AndyColson
Posts: 2
Joined: Sun 16 Apr 2006 20:46
Location: Iowa

Post by AndyColson » Mon 17 Apr 2006 14:37

After playing around some more, I found the problem.

It was the FetchRows thing. I'd assumed that more rows was better so I'd always increased it (from 25 up). I tried setting it to 1 and the data loaded in a second. I set FetchRows to 10 and it loaded in 0.3 seconds.

I'm amazed that it changes so drasticly. from .3 seconds to 9 seconds... thats amazing.

I tried some different query's to see if 10 was always the magic number, but its not. some querys loaded faster at 25 FetchRows, some faster at 10.

What is FetchRows? (yes, I read the help, its the number of rows returned in one batch) but is that delphi stuff in your component or a setting in the OCI stuff?

Is there an easy way to know what to set it to so I can always get good performance (I'm not even worried about the best performance... just as long as I dont get hit by really bad performance).

I note in the help you say it even varies across machine and network. There again, how do I know what to set it to so I dont get hit with terriable performance?

Thanks for the help, and quick response.

-Andy

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Tue 18 Apr 2006 09:20

There is no standard strategy for finding optimize value for FetchRows property. So the best way is to find it experimentally.

Post Reply