Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 Tags
Subject: RE: Indexes, best strategy
Thread ID: 232837 Message ID: 232852 # Views: 35 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Friday, June 26, 2009 12:04:48 PM         
   


> > In the past I have always create indexes on single fields that were going to be part of my WHERE clause, except for fields like boolean or with little varitions in values.
> >
> > I was recently on a beginners course with Oracle and the instructor spent a bit of time talking about indexes and b-tree and was quite adamant that if you had a primary key made up of multiple fields or regularly did searches on a group of fields that to get the best results you should create a compound index using those field and then use that expression in your where clause.
> >
> > With that in mind, say I have a table with Customer,Account,Invoice Date. In the past I would have created individual indexes on these fields and then used a where clause like:
> >
> >
 Customer = 'MyCustomer'
> >  AND Account = 1234
> >  AND Invoice Date = {01/02/2009}
> > 

> >


Another q: VFP imposed a lot of restrictions on ambiguous dates back before the turn of the century. Did that pass unnoticed in the UK? -)

-Anders



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