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


Hello Tushar

thanks for your response. My question is...

>> But you will in any case be having additional indexes on Customer, Account and

Why would I need any additional indexes give the example of usage. Is it just for that 2 percent where I may be query on those fields individually?

Again, for all of the time I have been using VFP (since Fox 2.0) I have createed index on single fields. I just making sure that strategy is still true and also is it true with Oracle and SQL Server

Thanks,


>
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



Steve Dingle
http://weblogs.foxite.com/SteveDingle/
www.dsbusinesssolutions.co.uk



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