[Progress Communities] [Progress OpenEdge ABL] Forum Post: Transactions during READ-JSON for NO-UNDO temp-table.

  • Thread starter Thread starter dbeavon
  • Start date Start date
Status
Not open for further replies.
D

dbeavon

Guest
I have a question about using the READ-JSON on a temp table handle. I am seeing a ton of transaction activity during READ-JSON on a temp table. TEMP-TABLE LL_pro_item_query_output:READ-JSON ("LONGCHAR", v_Long, "APPEND"). ... generates logging ... [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS BEGIN TRANS 2450 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS END TRANS 2450 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS BEGIN TRANS 2451 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS END TRANS 2451 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS BEGIN TRANS 2452 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS END TRANS 2452 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS BEGIN TRANS 2453 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS END TRANS 2453 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS BEGIN TRANS 2454 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS END TRANS 2454 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS BEGIN TRANS 2455 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS END TRANS 2455 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS BEGIN TRANS 2456 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS END TRANS 2456 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS BEGIN TRANS 2457 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS END TRANS 2457 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS BEGIN TRANS 2458 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] [19/10/10@12:28:04.514-0400] P-014480 T-065852 3 4GL 4GLTRANS END TRANS 2458 [FillLocationForQuery gen.Inventory.PerpetualInventorySession @ 347] .... many thousands of times ... The temp-table is NO-UNDO. See below. DEFINE TEMP-TABLE LL_pro_item_query_output NO-UNDO /* Access to pro_item itself */ FIELD pro_item_rowid as CHARACTER FIELD pro_item_rowid_hex as CHARACTER /* Access to pro_costing */ FIELD pro_costing_rowid as CHARACTER FIELD pro_costing_rowid_hex as CHARACTER /* Access to pro_duct */ FIELD pro_duct_rowid as CHARACTER FIELD pro_duct_rowid_hex as CHARACTER /* Access to lum_duct */ FIELD lum_duct_rowid as CHARACTER FIELD lum_duct_rowid_hex as CHARACTER /* Set to true after pro_item is retrieved into dataset */ FIELD pro_item_record_shadowing AS LOGICAL INIT FALSE /* pro_item identification values */ FIELD branch AS CHARACTER FIELD loc AS CHARACTER FIELD pro-type AS CHARACTER FIELD product AS CHARACTER. There are no outer transaction scopes in my example. The READ-JSON seems like it wants a transaction scope or it will otherwise create one itself! If I create records from ABL the old-fashioned way, I do not see any BEGIN TRANS or END TRANS in my 4GLTRANS logging output. Eg. the following doesn't seem to generate any 4GLTRANS activity of any kind... CREATE LL_pro_item_query_output. LL_pro_item_query_output.loc = "aaa". CREATE LL_pro_item_query_output. LL_pro_item_query_output.loc = "xxx". CREATE LL_pro_item_query_output. LL_pro_item_query_output.loc = "yyy". For now I plan on wrapping the READ-JSON() with an explicit transaction to avoid thousands of mini-transactions from being started and stopped. It seems odd, and any developer who reads this code afterwards may wonder what I'm doing. Is this proper behavior for READ-JSON? Is there a better way of influencing the behavior of transactions while reading data into the NO-UNDO temp-table? Thanks in advance.

Continue reading...
 
Status
Not open for further replies.
Back
Top