• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

efficient parsing of the resultset

 
Winston Smith
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
SJ Adnams
Ranch Hand
Posts: 925
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 925
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hehe, this kinda stuff isn't documented
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic