Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pulling Data from a Huge Cursor
Message
From
03/03/2014 13:54:14
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
03/03/2014 13:45:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01595090
Message ID:
01595689
Views:
39
>Yes, it trims automatically. I made changes to my code and it to be 10-12 Percent better.
>Though I am not very sure but I feel that that the following lines in my code are most time consuming.
>Can you suggest some improvement in this section please

Check where I showed you to use REST in my other response.

>
>
>For I=1 To m.nNumberofbillsincurrentfile && Loop to Separate Each Bill and we will Compress it later. There may be thousands of Bills 
>	Select Cursor_AllBills
>	Locate For Left(POS,9)='%%Page: 1' And Recno()>m.nBillend
>	nPageonestart=Recno()
>	Locate For Left(POS,9)='%%Page: 2' And Recno()>m.nPageonestart
>	nPageoneend=Recno()
>	Locate For Left(POS,9)='%%Page: 1' And Recno()>m.nPageoneend
>	nBillend=Recno()
>Select * From Cursor_AllBills Into Cursor Cursor_Splitedfile Where Recno()=>m.nPageoneend And Recno()<m.nBillend Readwrite
> * Rest of the code for compression etc.
>Endfor
>
>
>
>
>>>Sir, What is the reason of using varchar ?
>>
>>Copied from the original sample code posted.
>>
>>Don't use it myself,
>>the only virtue I know of is that it trims values automatically - simplifies chain concatenation
>>same storage length though
>>
>>In this particular case, C(254) should be good enough.
>>
>>I would even try a M as you don't need any index on this column, and your source data is CSV.
>>
>>As the file is huge, saving space on disk might also save execution time - to be tested though
Previous
Reply
Map
View

Click here to load this message in the networking platform