• Post Reply Bookmark Topic Watch Topic
  • New Topic

design question

 
Zeina Afif
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hope this makes sense.
my app is running on Jrun 3.1, and MS SQL Server 2000.
i have a jsp page that lists all queries saved in a table.
When one of these queries is selected, I pass through the query string the unique query id.
The next page takes the id and searches the db for the query details (sql statement etc).
the formating is already done in the SQL statement (for date types, money type etc...am using converting and casting).
Once the query returns the sql statement, then I run the selected sql statement and pass the results to a class that builds the table and results and returns a stringbuffer that I convert to a string and then save a session variable (in case users want to download query results to excel)
Performance is horrible. even if the query is simple. I'm not sure if it's:
- the SQL statement with the conversion of the datatype.
- passing the results to a class and building the table with data and then returning it as a stringbuffer and casting it to a string.
What can I do to improve performance? If I do all the work in a servlet, will it improve? If I use custom tags instead of the class ?
Would appreciate any advice.
Thanks
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most likely your performance bottleneck is in the database access but would be hard to tell without knowing the code. I would suggest you use some type of profiler to determine where most of your time is spent in the code.
The only other comment I have is if you are not using Connection Pooling then you should be.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!