Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Posts
    107

    Unanswered: db2 / as400 via iseries

    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.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Feb 2003
    Posts
    107

    "first time" defined

    Each time the web site is launched i what I mean by the first time (even if the application has been launched by someone else)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •