Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2004
    Location
    Amiens (FRANCE)
    Posts
    15

    Lightbulb Unanswered: Is it possible to speed-optimize DB by this strange way ?...

    hi,

    Does anybody know severals studies, reports, researchs, tests, benchmark results on this kind of DB optimization ?

    Let's considering, i'm working with a big database, with millions reccords, amongst 30 tables with 10 fields each one.

    1.
    If i have many fields named like this '12345fdf4564ggdfg65456446465' (for a privacy security reason)
    Is it important in the SQL execution speed ?

    2.
    if i have many tables (with fields too) named like "table123132111111122222222222fdgdfgdfgdfg22"
    Is it important in the SQL execution speed ?

    3.
    if my order creation table is this : table A, then table B, then table C and in last the table D.
    Supose the table D (last created,donc in the end of hard drive) is the table which contains the more data.
    Is the SQL execution will be slower than if the table was created in first (table a) ?

    4.
    now, supose the table D (last created) is the table which concerns the most part of SQL query of my application in a day and its contains the more data.
    Is the SQL execution will be slower than if the table was created in first (table a) ?

    5. last question :
    is it more speed to format a date in the SELECT query (so using DBS server) OR in the front back with using a PHP function (or other language) ?

    any ideas for all ?

    thanks for help ! (don't laugh please, and remeber i working on a big database...)
    Last edited by USA Mike; 05-07-07 at 05:25.
    Ps : i'm sorry for my english language expression mistake, cause i 'm french

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    1. non
    2. non
    3. non
    4. non
    5. c'est tout egal
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Apr 2004
    Location
    Amiens (FRANCE)
    Posts
    15

    hi

    i can't be equal on a big volume database....
    Ps : i'm sorry for my english language expression mistake, cause i 'm french

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    please give example for the SQL used in question 5
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Oct 2002
    Location
    Baghdad, Iraq
    Posts
    697
    Quote Originally Posted by USA Mike
    Does anybody know severals studies, reports, researchs, tests, benchmark results on this kind of DB optimization ?
    Yes. I bought a stopwatch for $30 at WalMart, and it is a great way to study optimization.

    Let's considering, i'm working with a big database, with millions reccords, amongst 30 tables with 10 fields each one.
    No, let the DBMS consider it. Create millions of records in a test database, write a script to time various queries and see what is faster.

    There is only one way to be certain and that is to test it yourself.

  6. #6
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Quick and dirty MSSQL Server test
    Code:
    DECLARE @Start DateTime
    
    SET @Start = GetDate()
    
    ---YourSQLStatementToTest
    
    SELECT DateDiff(ms, @Start, GetDate()) As 'Time Taken to Execute (milliseconds)
    George
    Home | Blog

Posting Permissions

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