Friday, March 30, 2012

Is it possible to 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...)1. non
2. non
3. non
4. non
5. c'est tout egal|||i can't be equal on a big volume database...|||please give example for the SQL used in question 5|||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.|||Quick and dirty MSSQL Server test

DECLARE @.Start DateTime

SET @.Start = GetDate()

--YourSQLStatementToTest

SELECT DateDiff(ms, @.Start, GetDate()) As 'Time Taken to Execute (milliseconds)

No comments:

Post a Comment