Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / March 2005

Tip: Looking for answers? Try searching our database.

SelectMethod=cursor and SelectMethod=direct

Thread view: 
Frank Brouwer - 30 Mar 2005 14:34 GMT
Hello All,

A query is taking more than 2 minutes to fetch 51 rows using
SelectMethod=cursor, when I change that to SelectMethod=direct I get the
results split seccond.  So in the system only the SelectMethod has been
changed nothing else.

Has any one a clue why there is so much differance?
What are the rules to know what method is best?

TIA,
Frank Brouwer
Joe Weinstein - 30 Mar 2005 18:12 GMT
> Hello All,
>
[quoted text clipped - 8 lines]
> TIA,
> Frank Brouwer

Hi. This setting is an artifact of a design decision in the old, free MS driver.
If you never need multiple-statement-execution transactions, or you never have
more than one open statement at a time, you can always use direct. Otherwise you
need cursor mode. With direct, if you have multiple statements open at one time,
this old driver creates extra DBMS sessions under-the-covers to process each
statement!
   However, there may be some DBMS tuning you can do to make cursor mode run
faster. Does the table (do the tables) have an appropriate index to make a
row-by-row cursor efficient on the data you want? Are you making your result sets
updateable or scrollable? If you don't have to do that, don't. Plain forward-only
non-updateable result sets are fastest.

Joe Weinstein at BEA


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.