Query Tuning for a single select statement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanonward001
    New Member
    • Aug 2008
    • 2

    Query Tuning for a single select statement

    Hi,
    This is regarding the query optimization.

    T_A table is having rows around 570000, and this query's cost comes out to 202.


    SELECT COUNT(1)
    FROM T_A
    WHERE LOWER(NAME) = LOWER(V_CIName)
    AND TYPE_ID = V_CIType_Id

    Is there any other way of writing the query to reduce the cost of this.

    I am in fix as the cost of such small queries is going very high.

    Looking for your co-operation

    Thanks & Regards,

    Sanjay
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    try to create function based index on the desired columns.

    Comment

    • Saii
      Recognized Expert New Member
      • Apr 2007
      • 145

      #3
      does TYPE_ID has an index associated to it? composite or simple?

      Comment

      • EVH316
        New Member
        • Aug 2008
        • 26

        #4
        i agree with bedasisa, function index for "LOWER(V_CIName )" will solve your problem

        Comment

        • sanonward001
          New Member
          • Aug 2008
          • 2

          #5
          Thanks All for your co- operation and quick response . It works :)

          Comment

          Working...