Paul,
Try
set deleted off
before you run the query.
When set deleted is on, your where clause equals to:
t_memo.type_number = memo_type.type_number and not deleted()
So it is not optimized.
HTH
>hi everyone:
>
>not sure why this is happening but perhaps someone can help.
>
>i am running an sql statement that, when i run it in vfp 8.0, it takes about .09 seconds, but when i run it in my application in the main program, it takes almost a full second. these times come from the status bar.
>
>the statement is as follows:
>
>
>CREATE VIEW view_memolist as;
>select pt_number, memo_date, memo_id, type, ;
>t_memo.memo, t_memo.type_number from ;
>t_memo, memo_type where;
>t_memo.type_number = memo_type.type_number
>
>
>i've run SYS(3054,2,"cResult") followed by the query, and then a messagebox with cresult, and it is not optimized at all for rushmore. not sure if maybe i'm doing it wrong here.
>
>also, when i run it in vfp8.0, the first time it takes significantly longer than each time i run the query after that. i'm assuming that it is being stored to memory which is why it is quicker the next time, but just wanted to check if that's correct.
>
>any suggestions would be appreciated. thanks.
>
>Paul
Dawa Tsering
"Do not let any unwholesome talk come out of your mouths,
but only what is helpful for building others up according to their needs,
that it may benefit those who listen."
- Ephesians 4:29-30 NIV
Dare to Question -- Care to Answer
Time is like water in a sponge, as long as you are willing you can always squeeze some.
--Lu Xun, Father of Modern Chinese Literature