Re: using Select SQL syntax and performance issues



Foxpro's SQL implementation works best with subsets.

If you just want to move an entire table to a temp table, use the COPY
command.

With a table of any size (and without joins), REPLACE will almost always be
faster than UPDATE.

Generally, slow queries are the result of a lack of Rushmore optimization.
See the help file for more information.

Dan





ddobier wrote:
> Hello. I'm new to foxpro but have a VB and sql server background. I'm
> trying to rewrite some existing foxpro programs that are very
> inefficient. What I'm noticing is that the majority of my sql
> statements are very slow to process. The table I'm either updating or
> searching through has approx 150000 records. Here's what I'm seeing:
>
> update cust set is_new = .T. - This statement takes about 4 minutes to
> execute. If I change it to use the replace function it processes
> immediately. I would think it would to the same for the update
> statement as I'm updating all records. Any thoughts as to why this is
> taking so long?
>
> select field1, field2, field3, field4 into cursor1 readwrite - this
> takes
> 1.5 minutes to process 150000 records. I would think this would be
> almost instantaneous as it's displaying all records. What gives? I
> moved the data files locally and see the same sluggish performance.
>
> To summerize, any sql command I give is very slow. Is this just how
> Foxpro is with sql statements? On some other SELECTS that are slow I
> checked and it's using the indexes for the joins. Is there some
> configuration option I must set like packet size, batch size, ....?
>
> Thanks for any assistance you may provide.


.



Relevant Pages

  • Re: COBOL stored procedure for DB2
    ... Regarding how you precompile the app, you must specify target mfcob to db2 prep, rather than target ibmcob. ... Have you also confirmed that, prior to executing the CALL statement, the host variables specified within the client app have the appropriate values? ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • Re: COBOL stored procedure for DB2
    ... Have you also confirmed that, prior to executing the CALL statement, the ... The DB2 CREATE PROCEDURE statement. ... MODIFIES SQL DATA ... confirm the cob command used for creating the SP module. ...
    (comp.lang.cobol)
  • Re: Cannot set CDX index on DBF file from C#
    ... > I am using .NET framework 2.0 to open Foxpro DBF files. ... > the connection / command process, none of the actual indexes ... > within the CDX file are being selected, so when I run a select SQL ... the FoxPro Index command requires exclusive use of the ...
    (microsoft.public.fox.helpwanted)
  • Re: using Select SQL syntax and performance issues
    ... You could use the CREATE CURSOR command to make the cursor and then the ... APPEND FROM command to populate the empty cursor. ... Microsoft FoxPro Technical Support ... I'm new to foxpro but have a VB and sql server background. ...
    (microsoft.public.fox.helpwanted)
  • Re: Can I get Consultancy advice on SQL/Fox in the UK (South East)
    ... My problem is the two Sequel Server tables within one database with which I ... Don't ask me why but the SQL designers have NOT ... command that I can initiate with SQLCONNECT, ... > While you're in the View Designer, right-click and view the SQL code. ...
    (microsoft.public.fox.helpwanted)

Loading