Quote:> hello, i am using db2 udb v8.1 on NT, with db2jcc.jar as jdbc driver
> (type 4)
> 1. i create a view with where clause , so when i create sql reading
> the view, i don't need to build the where clause on the fly. so based
> on the performance, which is better? create a view with where clause
> or create a view without where clause but build the where clause when
> create the sql?
There will be an extra access to some of the catalog tables to resolve the
view. Even with the view, the difference may not be significant. If the
same statement is repeatedly submitted by the same thread, the access plan
will be cached and there will be no extra processing.
Quote:> 2. which one is better, open the result set once, return a big result
> set or frequently open , return a smaller result set
This depends on whether there is any user wait time (to scroll to the next
set that fits on the screen, etc.). If there is a good chance that the user
will not look at all the rows, then it might be better to fetch them in
batches as the user requests them.
Quote:> can you provide me some sql performance tuning tips or articles?
> thanks
To improve performance, I would get off NT and onto Windows 2000 or higher.