Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select alltrim(lname) is 10x longer than select lname
Message
 
 
To
17/08/2006 10:39:02
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
SAMBA Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01146381
Message ID:
01146383
Views:
23
Add NOFILTER and time will be the same in both cases. W/o NOFILTER VFP may create filtered cursor by applying SET FILTER/SET FIELDS to the source table opened similar to USE...AGAIN.

>
>quick question here - i'm using the cursor result of a query as the rowsource for a combobox. when is do:
>
>select lname, fname from table into cursor cursor1
>
>it is 10x (0.4 seconds vs 4 seconds) faster than:
>
>select alltrim(lname) + " " + alltrim(fname) from table into cursor cursor1
>or even:
>select alltrim(lname) from table into cursor cursor1
>
>the rowsource for the combobox is cursor1
>
>i thought it had to do with optimization but there is no "where" clause in the select statement so rushmore shouldn't enter into it. even so, i indexed the table on "alltrim(lname)" and there was no change.
>
>if i'm concatenating (ie lname + fname), i need to do alltrim or the item will not fit in the combobox.
>
>am i doing anything wrong here? would it be better to select lname, fname into the cursor and then somehow take away the spaces when the cursor is made the rowsource? if so, how would i do that?
>
>thanks!
>
>paul
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform