Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Andy Kramek
  Where is Andy Kramek?
 Westminster Circle, Akron
 Ohio - United States
 Andy Kramek
 To: Steve Dingle
  Where is Steve Dingle?
 Weybridge
 United Kingdom
 Steve Dingle
 Tags
Subject: RE: Indexes, best strategy
Thread ID: 232837 Message ID: 232886 # Views: 32 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Friday, June 26, 2009 8:54:12 PM         
   


> > Steve,
> >
> > There are enormous differences between the way that VFP handles indexes and the way server databases do. You really cannot extrapolate from one to the other. Apart from anything else indexes in Database Servers are ONLY for optimizing queries - you don't (and can't) use an index to sort data for display.
> >
> > [1] I doubt that the instructor was talking rubbish. I also doubt that he/she said 'create a compound index' because as far as I know you cannot do that in Oracle (or SQL Server for that matter). What may have been said was to create a single index that contains multiple columns in the order in which you use them in queries.
> >
> > [2] No, - at least, you cannot create compound indexes without concatenating columns, which means converting them to the same data type. In SQL you can define an index as:
> >
CREATE INDEX acct_sch ON ACCOUNT ( customer, account, invoicedate)

> > and it would be usable for single, or multiple, column based queries. But in VFP you would have to build a compound key like:
> >
INDEX ON customer+STR(account)+DTOS(invoicedate) TAG acct_sch

> > and it would only be usable with concatenated strings or partial strings. So in VFP you are probably better off to stick to single column tags in your indexes (i.e. build a cdx with three tags, one each for customer, account and date)
> >
> > [3] SQL Server behaves much like Oracle.
> >
> >
> > Regards
> > Andy Kramek
> > Microsoft MVP (Visual FoxPro)
> > Tightline Computers Inc, Akron Ohio, USA
>
> Heya Andy,
>
> Hows things! Any plans to be over this side of the pond this year? Was hoping you would chime in as I know you worked with Oracle.
>
> Thanks for the input
>
> Steve Dingle
> http://weblogs.foxite.com/SteveDingle/

Actually we'll be in England from Thursday for a couple of weeks (Jul 2 - Jul 14) - but we won't be down in the London area this trip - we're up North most of the time, apart from a quick hop over to Dublin for four days between 6th and 10th. We are are flying into and out of Heathrow and will be staying at a hotel near Heathrow for the night of 14th - but we don't really know all our schedule yet (won't till we get to my Sister's and find out what she has aarranged for us)

Regards
Andy Kramek
Microsoft MVP (Visual FoxPro)
Tightline Computers Inc, Akron Ohio, USA



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