Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2003
    Posts
    17

    Unanswered: how to increase the query speed?

    A sql sentence select records from 11 tables
    More than one min should spend on it's execute.

    how to increase the speed?
    thans in advance.

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Try to make more quries then include these into your main Qurey
    i.e

    You have the main Query which have 3 Quries each has 2 quries for example..



  3. #3
    Join Date
    Oct 2003
    Location
    Jordan
    Posts
    28
    Hi all

    A select statment from 11 tables reflects bad design. We all know that using indexes will improve your performance but a select statment with that much of tables indexes will not give you the performance your are expecting.

    When processing transactions in your application try to use summary tables that are updated when transactions occur. this will resuce the number of tables in your statment and will reduce network traffic when you request reports.


    Regards,



    ______________
    Firas arramli
    SEI Systems anslyst

  4. #4
    Join Date
    Feb 2003
    Location
    @ home
    Posts
    163
    It's not necessary bad design database.
    What you could do it's removed all non used fields of your query, do the right inner joins.
    You may also optimise your tables creating the best keys on the fields, also relations between tables and also choose the appropriate data type of each field.

    Paulo

  5. #5
    Join Date
    Sep 2003
    Posts
    17
    I have tried the method pal19 adivise,but still slow.
    May be changing the database structure is my last way.

    thanks again.

  6. #6
    Join Date
    Oct 2003
    Posts
    5

    Querry Speed

    Here is my experience in speeding up querries...

    Use INNER JOINS wherever you can, and dont list multiple tables in the from statement (other then INNER JOIN)

    Rather Use the on... command of an INNER JOIN to filter data, rather then the WHERE command.

    Use mutiple querries, to break down calculation.

    In General this is fast
    Inner Joins, order by, sort

    this is slow
    from ...,.... where


    But sometimes you need to use the slow stuff

  7. #7
    Join Date
    Oct 2002
    Location
    Leicester - UK
    Posts
    820
    The best method is to learn all of sql's little quirks it's amazing how just doing things in a different order increase the speed
    Definition of a Beginner, Someone who doesn't know the rules.

    Definition of an Expert, Someone who knows when to ignore the rules.

Posting Permissions

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