Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: tushar
  Where is tushar?
 Panaji
 India
 tushar
 To: Steve Dingle
  Where is Steve Dingle?
 Weybridge
 United Kingdom
 Steve Dingle
 Tags
Subject: RE: Indexes, best strategy
Thread ID: 232837 Message ID: 232844 # Views: 42 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Friday, June 26, 2009 11:14:24 AM         
   


Customer+Account+Invoice Date =  'MyCustomer 1234 {01/02/2009}'


will be faster than

 Customer = 'MyCustomer'
AND Account = 1234
AND Invoice Date = {01/02/2009}


but not by a lot

But you will in any case be having additional indexes on Customer, Account and Date. So having another index will increase your data saving time and also the size of the indexes. You then have to see the frequency you require for using the Customer+Account+Invoice Date and then decide if you really need the extra index.

In VFP the order in which you use

Customer = 'MyCustomer'
AND Account = 1234
AND Invoice Date = {01/02/2009}


can also change the time required. So

Customer = 'MyCustomer'
AND Account = 1234
AND Invoice Date = {01/02/2009}


is not the same in time taken as

Account = 1234
AND Customer = 'MyCustomer'
AND Invoice Date = {01/02/2009}


Regards
Tushar



COMPLETE THREAD
Indexes, best strategy Posted by Steve Dingle @ 6/26/2009 10:34:22 AM
RE: Indexes, best strategy Posted by tushar @ 6/26/2009 11:14:24 AM
RE: Indexes, best strategy Posted by Steve Dingle @ 6/26/2009 11:37:22 AM
RE: Indexes, best strategy Posted by Ammar Hadi @ 6/26/2009 11:29:25 AM
RE: Indexes, best strategy Posted by Cetin Basoz @ 6/26/2009 11:37:15 AM
RE: Indexes, best strategy Posted by Anders Altberg @ 6/26/2009 12:04:48 PM
RE: Indexes, best strategy Posted by Cetin Basoz @ 6/26/2009 1:35:36 PM
RE: Indexes, best strategy Posted by Steve Dingle @ 6/26/2009 2:57:16 PM
RE: Indexes, best strategy Posted by Andy Kramek @ 6/26/2009 12:38:12 PM
RE: Indexes, best strategy Posted by Steve Dingle @ 6/26/2009 2:59:37 PM
RE: Indexes, best strategy Posted by Andy Kramek @ 6/26/2009 8:54:12 PM