Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index on multiple integer fields
Message
From
20/12/2005 10:35:06
 
 
To
20/12/2005 09:59:00
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01079271
Message ID:
01079548
Views:
23
>>>"Correct" gets the job done. "Efficient" is a different issue.
>>>
>>>Here's an example:
>>>You have a table (Customers) with 1 million rows. There is an index (FullName) on UPPER(LastName + FirstName). What is the "correct" way of finding a particular name? Is it:
>>>
>>>a) LOCATE UPPER(m.LastName + m.FirstName)?
>>>b) SET ORDER TO TAG FullName then SEEK UPPER(m.LastName + m.FirstName)?
>>>c) SEEK(UPPER(m.LastName + m.FirstName), "Customers", "FullName")?
>>>d) SELECT * FROM Customers WHERE UPPER(LastName + FirstName) = UPPER(m.LastName + m.FirstName)?
>>>
>>>Answer is:
>>>All of the above are "correct", but some are more efficient than others.
>>>
>>
>>Then, among the 4 solutions, what is the "correct" choice ?
>>
>
>All are "correct" as they will all get the needed results.

terrible.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform