Home > Archive > FoxPro Help and Support > October 2005 > use select









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author use select
bijan

2005-10-27, 8:34 am

I use this command in my program .
SELECT * FROM dicf WHERE aswc $ e INTO CURSOR lodg
It work very good and the speed of search is very good
But when I make an EXE from my program and run it in another computer that
don’t have vfp the speed of this search from this command is very low .
What must I do to have high speed search from this comman
SELECT * FROM dicf WHERE aswc $ e INTO CURSOR lodg


Fred Taylor

2005-10-27, 8:34 am

There's not much you can do to speed up that kind of search. There's no
simple way to create a usable index.

--
Fred
Microsoft Visual FoxPro MVP


"bijan" <bijan@discussions.microsoft.com> wrote in message
news:CF98EB78-E82E-46E9-952C- C315EEDB19E5@microso
ft.com...
>I use this command in my program .
> SELECT * FROM dicf WHERE aswc $ e INTO CURSOR lodg
> It work very good and the speed of search is very good
> But when I make an EXE from my program and run it in another computer that
> don't have vfp the speed of this search from this command is very low .
> What must I do to have high speed search from this comman
> SELECT * FROM dicf WHERE aswc $ e INTO CURSOR lodg
>
>



Olaf Doschke

2005-10-27, 8:34 am

Hi bijan,

> But when I make an EXE from my program and run it in another computer that
> don't have vfp the speed of this search from this command is very low .


The reason for that can't be, that it's compiled and/or only the vfp runtimes
are installed on that machine.

The reason may be network is slower, perhaps at your development machine
the application and the data both is on a local drive. That speeds things up
much of course.

An instring search with $ is not optimizable, as Fred said, and in the long
term will always slow down with increase of data, as it's always a full table
scan search.

There is no easy way to build an instring search index to speed this up.

Bye, Olaf.



Carsten Bonde

2005-10-27, 8:34 am

Bijan,

Fred is right. You havn't had the problem, probably because your testdate
ist a lot smaller than your users database. I think MS SQL-Server has
something like a word-Index, but i havn't worked with MS SQL for several
years now, so i can't tell more on that.

Try to analyse your select-Statements. If your user always searches all
records where dicf.asws BEGINS with e, you might consider using a
select-statement like this:
SELECT * ;
FROM dicf ;
WHERE aswc = e ;
INTO CURSOR lodg

This will be optimized (if there is an index on dicf.aswc).

--
Cheers
Carsten
____________________
___________

"bijan" <bijan@discussions.microsoft.com> schrieb im Newsbeitrag
news:CF98EB78-E82E-46E9-952C- C315EEDB19E5@microso
ft.com...
>I use this command in my program .
> SELECT * FROM dicf WHERE aswc $ e INTO CURSOR lodg
> It work very good and the speed of search is very good
> But when I make an EXE from my program and run it in another computer that
> don't have vfp the speed of this search from this command is very low .
> What must I do to have high speed search from this comman
> SELECT * FROM dicf WHERE aswc $ e INTO CURSOR lodg
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com