If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Is it possible to optimize DB by this strange way ?...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-07-07, 03:51
USA Mike USA Mike is offline
Registered User
 
Join Date: Apr 2004
Location: Amiens (FRANCE)
Posts: 15
Lightbulb 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...)
__________________
Ps : i'm sorry for my english language expression mistake, cause i 'm french

Last edited by USA Mike; 05-07-07 at 04:25.
Reply With Quote
  #2 (permalink)  
Old 05-07-07, 05:28
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
1. non
2. non
3. non
4. non
5. c'est tout egal
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 05-07-07, 05:30
USA Mike USA Mike is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 05-07-07, 07:24
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
please give example for the SQL used in question 5
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 05-07-07, 22:28
sco08y sco08y is offline
Registered User
 
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.

Quote:
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.
Reply With Quote
  #6 (permalink)  
Old 05-08-07, 04:05
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
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
Twitter | Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On