Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Wonderment
Message
 
To
16/06/1996 05:48:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00002345
Message ID:
00002393
Views:
37
>>Why does the first SQL process 30 to 50 percent
>>faster then the second SQL???? They are exactly
>>the same.
>
>>It would 'seem' that a single SQL would run
>faster
>>then 2 SQls, wouldn't it? Especially when the
>>first one is creating 2 storage spaces (cursors)
>>and the second one is just creating one.
>>
>>Baffled Tom
>
>not always - by seperating the SQL staements
>the second SQL gets much less records for process
>,thus works
>faster
>sometime the rushmore optimization can't decide
>correctly what
>condition to execute first (or at least that what
>i found)

Arnon

My experience is the first statement goes first otherwise my current SQL would not work!

From what you are saying it appears VFPs SQL is not very efficent at handling data groups internally! This makes sense since with 2 SQLs you are running 2 seperate commands (2 SQLs) and creating 2 seperate cursors. That is twice the work. If it takes 1 SQL (total) statement longer then 2 then I would say there is a data grouping (segmenting?) problem. If 'we' are aware of this then we can write better SQLs (faster) if we keep this in mind.

Tom
Tom
--------------------------------
Tom O'Hare
407-299-4268 -- tom@redtile.com -- http://www.redtile.com/
Independent Programmer Using Visual FoxPro, Visual Basic & more...
Operations Manager -- Virtual FoxPro User Group (VFUG)
http://www.vfug.org/ -- tom@vfug.org
President -- Central Florida FoxPro User Group (CFFUG)
http://www.redtile.com/foxpro/
Universal Thread Most Valued Professional (MVP)
http://www.transformation.com/foxpro/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform