DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: max ( ) function

  1. #1
    Join Date
    Dec 2007
    Posts
    9

    max ( ) function

    Does a max function always trigger a FTS? What are the ways around it?

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,334
    function based indexes

  3. #3
    Join Date
    Dec 2007
    Posts
    9
    according the manuals this is not allowed because max is a group function. anyone with a solution for this ?

  4. #4
    Join Date
    Nov 2002
    Location
    Mooresville, NC
    Posts
    349
    Do you have index on that column at all. If so it should use index full scan.
    http://www.perf-engg.com
    A performance engineering forum

  5. #5
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    mmhhhh... an Index Full Scan to get all rows in the table would be more expensive than a Full Table Scan.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  6. #6
    Join Date
    Nov 2002
    Location
    Mooresville, NC
    Posts
    349
    mmhhhh... an Index Full Scan to get all rows in the table would be more expensive than a Full Table Scan
    It's a max function, it does not need to read all details from table rows. It'll get the details from index.
    http://www.perf-engg.com
    A performance engineering forum

  7. #7
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    Quote Originally Posted by malay_biswal
    It's a max function, it does not need to read all details from table rows. It'll get the details from index.
    I stand corrected, you are right.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

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


Click Here to Expand Forum to Full Width