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

Thread: Speeding up Queries

  1. #1
    Join Date
    Dec 2001
    Posts
    320
    Hi guys,
    what are the best methods to be taken into consideration when writing a query in order to speed up the performance?
    For instance i know that using Count(1) is more effeicent than using Count(*).
    any similar examples would be highly appreciated.

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    count(1) and count(*) is same, no difference at all

  3. #3
    Join Date
    Feb 2000
    Location
    Singapore
    Posts
    1,758
    1. Do not use functions in where cluase, it will not use the indexe unless you have FBI.

    2. Make use of hints to improve performance.

    3..

    Three are more "sql good practices" to follow do not remember right now..

    Sanjay

  4. #4
    Join Date
    Dec 2001
    Posts
    320
    Hi pando,
    According to Couchman's using count(1) is more effecient than using count(*).

  5. #5
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    you can try it yourself, set autotrace on and look explain plan and statistics

    compare them and you will see they are the same

  6. #6
    Join Date
    Apr 2002
    Location
    Germany.Laudenbach
    Posts
    448

    Lightbulb

    Originally posted by hany
    Hi guys,
    what are the best methods to be taken into consideration when writing a query in order to speed up the performance?
    For instance i know that using Count(1) is more effeicent than using Count(*).
    any similar examples would be highly appreciated.
    Hello;
    On this site there is an introduction for Tuning; Look at it!
    Orca


    [Edited by Orca777 on 06-13-2002 at 05:38 AM]

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