Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2003
    Posts
    1,605

    Unanswered: DB2 Teory question: stage 1 vs. stage 2 predicates

    Hi,

    On web page Top Ten SQL Performance Tips by Sheryl M. Larsen on page 5 I have found tip number 2. But I don't understand what the author thought.

    My question: What is the main difference between "Stage 1 Predicates" and "Stage 2 Predicates"?

    Thanks,
    Grofaty

  2. #2
    Join Date
    Feb 2002
    Location
    Germany
    Posts
    141
    Grofaty,

    I suppose, she is talking about DB2 OS390. In the process of answering SQL requests from users (clients, applications, etc), DB2 distributes the work among some "agents":

    RDS (Relational Data Services), this is stage 2
    DM (Data Manager), this is stage 1
    BM (Buffer Manager) - interacts with VSAM to get the data pages from VSAM LDS into Bufferpool.

    A stage 1 predicate is a "WHERE" clause, that can be done by the DM. If the DM cannot process it (because your host variables have another data type as the columns you're checking against, or the operator isn't supported, or, or, or - check the administration guide for a complete list), it sends the rows it could filter to the RDS. The RDS does the necessary filtering and, if it you have an ORDER BY and no index in the database supports this order, RDS will sort the rows using the database DSNDB07.

    For a complete list of predicates that are STAGE 1 ("sargable") and STAGE 2 ("non sargable"), look at the documentation. The list changes with new versions of the product.

    This is only an introduction to the topic. But I think, with some of these keywords you can search for more details on the docu.

    HTH,
    Rodney Krick

  3. #3
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    You might find this article interesting...

    http://www.db2mag.com/db_area/archiv...grammers.shtml

  4. #4
    Join Date
    Nov 2003
    Location
    Jakarta, Indonesia
    Posts
    32

    Another One

    Some other reason to move to DB2 8.1:

    http://www.db2mag.com/story/showArti...cleID=17602323
    Regards,
    Adam Ac

  5. #5
    Join Date
    Nov 2003
    Location
    Jakarta, Indonesia
    Posts
    32
    Is this stage 1, stage 2 predicate apply to DB2 UDB or only for z/OS and OS/390 ???

    Originally posted by Damian Ibbotson
    You might find this article interesting...

    http://www.db2mag.com/db_area/archiv...grammers.shtml
    Regards,
    Adam Ac

  6. #6
    Join Date
    Jan 2003
    Posts
    1,605
    Originally posted by RKrick
    Grofaty,

    I suppose, she is talking about DB2 OS390. In the process of answering SQL requests from users (clients, applications, etc), DB2 distributes the work among some "agents":

    RDS (Relational Data Services), this is stage 2
    DM (Data Manager), this is stage 1
    BM (Buffer Manager) - interacts with VSAM to get the data pages from VSAM LDS into Bufferpool.

    A stage 1 predicate is a "WHERE" clause, that can be done by the DM. If the DM cannot process it (because your host variables have another data type as the columns you're checking against, or the operator isn't supported, or, or, or - check the administration guide for a complete list), it sends the rows it could filter to the RDS. The RDS does the necessary filtering and, if it you have an ORDER BY and no index in the database supports this order, RDS will sort the rows using the database DSNDB07.

    For a complete list of predicates that are STAGE 1 ("sargable") and STAGE 2 ("non sargable"), look at the documentation. The list changes with new versions of the product.

    This is only an introduction to the topic. But I think, with some of these keywords you can search for more details on the docu.

    HTH,
    Than you very much RKrick.

    Does this stages applyes to UDB also?

    Thanks,
    Grofaty

Posting Permissions

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