hi
 
following help is from the developers guide. The one where you save time is
 
"Records are only inserted when the kernel finds the time appropriate, but no later than the call to insertDatabase."
 
regards
 
harry
 
 

RecordInsertList

RecordInsertList may be considered an alternative to RecordSortedList, without the sort order features, and with additional built-in client/server support (it automatically packs data from one tier to another whenever needed).
RecordInsertList is container-like, and from a database point of view, it inserts records in the most efficient way. It is constructed for a particular table type, new RecordSortedList(tablenum(myTable)).

RecordInsertList has two methods:

  • add(myTable)
    Add records for insertion

  • insertDatabase()
    Complete the insertion.

Records are only inserted when the kernel finds the time appropriate, but no later than the call to insertDatabase. Both methods, add() and insertDatabase(), returns the accumulated number of records currently inserted. This allows you to keep track on when the records are actually inserted.

Like RecordSortedList, the array insert operation automatically falls back to classic record-by-record inserts when non-SQL based tables are used (for example temporary tables), or the insert() method on the table is overloaded (unless explicitly discarded).

 



[EMAIL PROTECTED] wrote:
thanks harry,

I will see what can be done (it is existing code that I dont want to change too
much but I guess turning of TMP property is not going to cause problems....)

Sorry not being a programmer I have no idea what record insert list is....can
point me in the right direction.

Thanks for all your help
James

Quoting "Harry (Harshawardhan Deshpande" <[EMAIL PROTECTED]>:

> hi

> yes, a normal table, thats what I meant.

> I think you should add an index as well but not sure.

> You should however use record insert list, this will certainly speed up the
> performance.

> regards

> harry
>
> James Flavell <[EMAIL PROTECTED]> wrote:
> sorry forgot,

> and add index as well?

> wondering is the overhead on inserts (50,000) going to outweigh the read
> performance of an index (500,000)...

> thanks again
> James

>
> -----Original Message-----
> From: Axapta-Knowledge-Village@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of James Flavell
> Sent: 28 September 2005 14:35
> To: Axapta-Knowledge-Village@yahoogroups.com
> Subject: RE: [Axapta-Knowledge-Village] To add or not to add an index?
>
>
> so I should make it a normal table you mean is it harry?
> Thanks
> James
>
> -----Original Message-----
> From: Axapta-Knowledge-Village@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of Harry
> (Harshawardhan Deshpande
> Sent: 28 September 2005 15:24
> To: Axapta-Knowledge-Village@yahoogroups.com
> Subject: Re: [Axapta-Knowledge-Village] To add or not to add an index?
>
>
> hi James

> I think that with 50,000 records the database search will be lot faster than
> searching the temp table.

> regards

> harry
>
> James Flavell <[EMAIL PROTECTED]> wrote:
> Hi
>
> I have an import script that is inserting/updating info to an Axapta temp
> table that has about 7 fields in it.
>
> In my import script I need to go into this temp table to check if a record
> already exists based on three of the fields that are being imported (i.e.
> checking what I am importing whetehr it has been imported before etc).
>
> I am wondering is it worth while to put a unqiue index on this table for
> these 3 fields or not?
>
> I am expecting maybe to have 50,000 records in this temp table every time I
> run the import script and will need to search it maybe 500,000 times during
> the import....
>
> If there is no index will SQL do some 'optimization' so the performance
> difference is minimal? (I mean the number of fields on the table is not that
> many more than the index and I am wondering given the small size of the
> record SQL will cache or keep all the records in memory - although since it
> is a TMP table I am not sure will any of this be stored in the SQL or on the
> client - should I cahnge from TMP to normal table???)
>
> Appreaciate some advice so as to speed up this import
> Thanks
> James
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>
> Sharing the knowledge on Axapta.
>
>
>
> SPONSORED LINKS
> Business finance course Business to business finance Small business finance
> Business finance consultant Business finance magazine Business finance uk
>
> ---------------------------------
> YAHOO! GROUPS LINKS
>
>
>     Visit your group "Axapta-Knowledge-Village" on the web.
>  
>     To unsubscribe from this group, send an email to:
>  [EMAIL PROTECTED]
>  
>     Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
> ---------------------------------
>
>
>
>            
> ---------------------------------
> Yahoo! for Good
>  Click here to donate to the Hurricane Katrina relief effort.




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

Sharing the knowledge on Axapta.



YAHOO! GROUPS LINKS




Reply via email to