Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2009
    Posts
    46

    Unanswered: query is taking Time

    Hi,

    I have a table called tbl_Folio_Master in this table i have column Foliono also created a nonclustor index on this coulmn.but when i am firing query on this table then it is taking more than a 5 hour to get the result with around 40 lacs data in the table.
    below is the query which i am writing :
    select INVESTOR_ID from tbl_Folio_Master where upper(trim(FolioNO))="Foliono"

    Please suggest me how to improve the performense of the query and get the result within 10 to 15 minuts.

    Thanks,
    Prasad

  2. #2
    Join Date
    Jun 2009
    Posts
    46

    query is taking Time

    Hi,

    I have a table called tbl_Folio_Master in this table i have column Foliono also created a NONUNIQUE index on this coulmn.but when i am firing query on this table then it is taking more than a 5 hour to get the result with around 40 lacs data in the table.
    below is the query which i am writing :
    select INVESTOR_ID from tbl_Folio_Master where upper(trim(FolioNO))="Foliono"

    Please suggest me how to improve the performense of the query and get the result within 10 to 15 minuts.

    Thanks,
    Prasad

  3. #3
    Join Date
    Mar 2010
    Location
    Vienna, Austria
    Posts
    149
    create a concatenated function based index upper(trim(FolioNO)), INVESTOR_ID
    "There is always an easy solution to every problem - neat, plausible, and wrong."
    -- H.L. Mencken

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by prasadtiwari View Post
    ... where upper(trim(FolioNO))="Foliono"
    how do you expect a value which you have forced into upper case to ~ever~ be equal to a value containing mixed case?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

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