Query Performance

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • srics
    New Member
    • Mar 2007
    • 8

    #1

    Query Performance

    Hi,

    If there are more than 15LAC records in the "cdetail" and "clm" table, Timeout exception occurs. Could anyone please help me in increasing the performance of this query: (Is there any way without using index)
    [code=sql]
    SELECT clm.ft, cdetail.clmid, cdetail.cline,
    cdetail.servcod e, cdetail.revcode , clm.bccode,
    clm.fycode FROM cdetail
    INNER JOIN clm ON (clm.clmid = cdetail.clmid)
    INNER JOIN bplan ON (cdetail.pid = bplan.pid)
    INNER JOIN pgm on pgm.pgmid=bplan .pgmid
    WHERE
    bplan.pgmid in ('DMXHPQ1596', 'DMXHPQ1600', 'DMXHPQ1601', 'DMXHPQ1602')
    AND
    pgm.cgp > '' AND
    clm.sts IN ('AJ', 'PD', 'PY', 'RV', 'WP', 'DN', 'VD')[/code]
    Last edited by srics; Dec 12 '07, 12:03 PM. Reason: Added some more details
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    What is the use of indexes then.

    What is the problem if using indexes.

    Comment

    • srics
      New Member
      • Mar 2007
      • 8

      #3
      Originally posted by debasisdas
      What is the use of indexes then.

      What is the problem if using indexes.

      If we use indices, performance will get reduced during insert and update statements. Hence i am trying to avoid index.

      Is there any better way to refine this qurey??

      Comment

      Working...