aspose file tools*
The moose likes JDBC and the fly likes efficient parsing of the resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "efficient parsing of the resultset" Watch "efficient parsing of the resultset" New topic
Author

efficient parsing of the resultset

Winston Smith
Ranch Hand

Joined: Jun 06, 2003
Posts: 136
Hi all,
I'm currently designing a database and I'd like to get some suggestions on the following--when parsing the results of a query, is it most efficient to have a ResultSet with several rows (few columns), or one with few rows and many columns? Is the ResultSet stored as doubly-linked list?
Thanks for any suggestions,
::WS
[ June 09, 2003: Message edited by: Winston Smith ]

for (int i = today; i < endOfTime; i++) { code(); }
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
I think you'll find that the database works better with narrow tables (few columns, lots of rows).
I'm fairly sure that DB2 uses a different algorithm once a query exceeds a certain number of columns (20ish? ) which causes a slowdown.
That said, it's better not to limit your whole database design by a single possible performance hit.
Winston Smith
Ranch Hand

Joined: Jun 06, 2003
Posts: 136
Thanks, Simon. I've been dredging through Oracle's technical manuals and found little info on this, but I'll give both schemes a try and post the results.
::WS
SJ Adnams
Ranch Hand

Joined: Sep 28, 2001
Posts: 925
hehe, this kinda stuff isn't documented
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: efficient parsing of the resultset