yes as subbu has mentioned in the select method if the
field has an index then always use "index hint".
   if you see any of the find methods on the tables
"index hint" is always used. This acts like pointers
in C. This will improve the performance a lot.
But in your code it would be best if you use

  SalesTable = SalesTable::find(_salesId);


--- "Subrahmanyam, Mamidi" <[EMAIL PROTECTED]> wrote:

> Hi Brandon,
> I am also running in the 3 tier. Basically you are
> reading the ascii file record fields to fetch the
> SalesId for that customer. Since you are using
> SalesTable , since SalesId is the unique index, you
> can include firstonly the statement to:
>  
>  Select firstonly SalesTable
>                 where SalesTable.SalesId ==
> _salesId; this is speed up the fetching the record
> rather than selecting whole Table j. Its just better
>  way. (  You can use 
>           
>              Select SalesTable
>                   Index SalesIdx
>                          where SalesTable.SalesId ==
> _salesId; ). but since you are SalesId is uniuque,
> its nice to use 'firstonly'.
>  
>  
> I am afraid what other things are causing slowness.
>  
> Umm, will see if anyone has any thoughts.Sicne you
> said you are experiencing slowness only for
> Confirmation , I am curious to know anyone has any
> exp....like this.
>  
> Can anyone share if you have this kind of exp?.
>  
> Best of luck,
> subbu
>  
>  
>  
>  
>  
>  
>  
>  
>  
>  
> 
>  
> 
>  
> 
> 
> Brandon George <[EMAIL PROTECTED]> wrote:
> Ok,
>  
>  Thanks for the reply... btw, this is running in a
> 3-tier environment - Client -> AOS -> Database. You
> said you could make use of the SalesIdx, what do you
> mean by that? How in code can you make use of the
> SalesIdx? Can you give me an example of explain?
>  
> To give you a better understanding of this code, it
> is being called from in a Batch type of process,
> where a Flat File is read in with information that
> supplies info - to get SalesId. So this runs on
> about 300-2000 orders a day, depending on the Orders
> and time of year.
>  
> Anyway any more advice, on how to use the SalesIdx
> would be great!
>  
> thanks,
> Brandon
> 
> 
> ---------------------------------
> From: Axapta-Knowledge-Village@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Subrahmanyam, Mamidi
> Sent: Monday, August 15, 2005 2:40 PM
> To: Axapta-Knowledge-Village@yahoogroups.com
> Subject: RE: [Axapta-Knowledge-Village] Why so
> slow???
> 
> 
> 
> or may be use firstonly. But I am not sure why this
> is executed slowly on your environment.
> will see if anyone has other thoughts like, run on
> clinet/server etc etc...
> 
> 
> "Subrahmanyam, Mamidi" <[EMAIL PROTECTED]> wrote:
> Hi Brandon,
>  
> I created a sales order with quatation and tried to
> confirm your code. Its confirming to salesorder and
> its pretty fast . However i am doing in a job. 
>  
> But if I use SalesIdx on the select SalesTable
> statement, i could save 1/4 of the execution time (
> just by using WinAPI:;GetTickCount() before and
> after trcy catch block )
>  
> But I am not sure what else is causing the slowness.
> 
>  
> Actually, I was also doing the same std code  by
> keeping the job ( confirming/postings etc etc )
> attached a menu item. but ours run very fast.
>  
> Umm, I am handsup :(. We will see for others
> comments.
>  
> hope you will get rid of this soon.
>  
> Thanks,
> subbu
> 
> 
> Brandon George <[EMAIL PROTECTED]> wrote:
> Sure thing,
>  
>     We are running Axapta 3.0 with SP3. Below is the
> code used to Confirm the Orders:
>  
> public boolean confirmSalesOrder(SalesId  _salesId)
> {
>     SalesFormletter SalesFormletter;
>     SalesTable      SalesTable;
>     boolean         b = false;
>     ;
>  
>     try
>     {
>         SalesFormletter =
>        
>
SalesFormletter::construct(DocumentStatus::Confirmation,true);
>  
>         SalesTable.clear();
>         Select SalesTable
>                 where SalesTable.SalesId ==
> _salesId;
>  
>         SalesFormletter.update(SalesTable,
>                                         
> systemDateGet(),
>                                         
> SalesUpdate::All,
>                                         
> AccountOrder::None,
>                                          false,
>                                          false);
>         b = true;
>     }
>     catch
>     {
>         // error occured
>         b = false;
>     }
>  
>     return b;
>  
> }
>  
> Thanks for reviewing it, maybe you can give me some
> pointers!
>  
> thanks,
> Brandon
> 
> 
> ---------------------------------
> From: Axapta-Knowledge-Village@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Subrahmanyam, Mamidi
> Sent: Monday, August 15, 2005 10:26 AM
> To: Axapta-Knowledge-Village@yahoogroups.com
> Subject: RE: [Axapta-Knowledge-Village] Why so
> slow???
> 
> 
> 
> Hi Brandon,
>  
> Can you please post your code here to see if I can
> run it in my development server?.
> We also do the similar kind of stuff using
> connectivitty studio.
> Anyway, Can you please share the code what exactly
> you are doing?. which version of axapta and which
> version of SP?.
>  
> Thanks,
> subbu
> 
> Brandon George <[EMAIL PROTECTED]> wrote:
> I am cursed or something? :-) Just joking
> everyone... but really - no response to this
> question? No one here has ever ran into Committing
> an Order through code and it being slow? Like Slower
> than when you do it through the Sales Form?
>  
> thanks,
> Brandon
> 
> 
=== message truncated ===



                
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hhn63j3/M=362131.6882500.7825259.1493532/D=groups/S=1705001380:TM/Y=YAHOO/EXP=1124188375/A=2889190/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Put more honey in your pocket. (money matters made easy) Welcome to the Sweet 
Life - brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

Sharing the knowledge on Axapta. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Axapta-Knowledge-Village/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to