Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Too Many Subqueries
Message
From
16/10/2001 07:13:30
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00567770
Message ID:
00568917
Views:
14
>Taking an academic approach to a SQL Select statement does not guarantee the best results. If fastest data retrieval is what you want put the text books aside and approach each problem with forethought. After a few attempts at doing this you will soon learn when to apply it and when not too. As with everything in programming there is no one way to do everything.
>
>Tom

Yes, I know. I have been surprised several times myself. One of the first times was when I thought that an index on deleted() was required on every table, for Full Rushmore Optimization. Of course it is, but F.R.O. isn't always the fastest (I wrote something about this in one of the FAQ, here at the UT). OTOH, even though current theory says that you should NOT use this index, it seems there are cases (small tables, no network) where the additional index actually speeds things up.

I got another surprise when I decided to actually test the theory that integer keys (PKs, FKs) are faster than character keys (because of their usually smaller size). In my tests, 10-byte character keys turned out to be slightly faster for a JOIN (however, I still prefer to use Integers, for other reasons).

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform