Re: using Select SQL syntax and performance issues
- From: Leemi@xxxxxxxxxxxxxxxxxxxx (Lee Mitchell)
- Date: Fri, 30 Dec 2005 18:39:10 GMT
Hi ddobier:
You could use the CREATE CURSOR command to make the cursor and then the
APPEND FROM command to populate the empty cursor.
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP9 HAS ARRIVED!! --*
Read about all the new features of VFP9 here:
http://msdn.microsoft.com/vfoxpro/
*--Purchase VFP 9.0 here:
http://www.microsoft.com/PRODUCTS/info/product.aspx?view=22&pcid=54787e64-52
69-4500-8bf2-3f06689f4ab3&type=ovr
Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/gp/lifeselectindex
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003
>Can I copy the data from one table into a cursor with the copy command?
It
>looks like from the help menu that it has to be to a file or array.
>Thanks.
>"Dan Freeman" wrote:
> 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.
>
>
>
.
- References:
- Re: using Select SQL syntax and performance issues
- From: Dan Freeman
- Re: using Select SQL syntax and performance issues
- Prev by Date: RE: using Select SQL syntax and performance issues
- Next by Date: Re: Capturing "Replace Field"
- Previous by thread: Re: using Select SQL syntax and performance issues
- Next by thread: RE: using Select SQL syntax and performance issues
- Index(es):
Relevant Pages
|
Loading