What 'first time' do you mean ?
Generally after you restart your DB2 database/subsystem(sorry, I don't know the correct terminology on ISeries), the data you need is not in the bufferpools ... So the 'first time' DB2 has to do physical IO ... Therefore the repsonse is much slower ...
Similarly, if you have been accessing lots of other tables, the 'first time' a query is accessing a table, physical IO similar to the one mentioed above has to happen ... Therefore it is slower ...
For the former case, if you know which set of tables/indexes is being accessed, whenever you restart db2, I would recommend running queries to access those set of tables before the end-user accesses the tables from the application and finds it slow ..
If many of these are small lookup tables that your front-end appl uses to populate, say drop-down lists, you may put all the tables to a separate bufferpool ... You may access these tables before the application does, when you restart the database .. Having these reference data in their own bufferpool also means that the larger tables will not be able to 'flush' these
tables from the bufferpool
HTH
Sathyaram
Quote:
|
Originally Posted by dotolee
I'm connecting to a db2 database via iseries driver. Noticing that the first time I query for details, it's really slow. but the second / subsequent calls are faster.
can the indexes be a problem?
do i have to create a separate index for every field that is listed in my where clause?
Thanks.
|