× Heads up!

Aqua Data Studio / nhilam

Follow
IDE for Relational Databases
×
bobfromtn reported 2017-08-08T05:08:04Z  · nhilam last modified 2017-09-26T18:40:44Z

Unacceptably slow insert performance


customer request
Dev
Fun Fun
funfun
QA
Tariq Rahiman
tariqrahiman
Priority Critical
Complexity Unknown
Component Open API - IO
Version 18.0

I have a draft script that serves an ETL purpose of reading rows from a source and writing to a target.  The script took over 60 seconds to insert 10k rows (of only one column).  My real script runs around 20 minutes to insert 170k rows, which obviously is not acceptable for a production system.  Is this the expected/normal performance of ADS datawriter on inserts?  (I hope something has been missed.)

My first effort was to move to the attached draft script that strips out my abstract, data-driven logic in favor of direct and simple coding to transfer the source value to target datarow.  Next I tried to address performance by turning off auto-commit, which I believe I now have success with (previously, I could see rows in the table from another session; now in this draft where it will not commit until the end, I do not see table rows from another session while the script runs).  I also monitored the sessions while the script was running and did not see the transaction renewing, when previously I did.

However, this simplified attached draft script is still taking over 60 seconds:

Computername is MONOLITH
Executing query to NetSuite...
Target result column structure=customer_id(int8)
Table Column[customer_id]
Table Column[date_last_modified]
PrimaryKey: 
DB Status: powell  Connected: true on session 8011  DB version: POSTGRESQL.9.5 Autocommit status: undefined  javaConn.getAutoCommit()=false
.......... 
.......... 
.......... 
.......... 
.......... 
.......... 
.......... 
.......... 
.......... 
.......... 
Read 10000 source rows and 0 target rows; 10000 rows inserted, 0 rows updated, 2 commits, 0 rollbacks
Script execution time: 66071
*** Script Completed ***
If I comment out the data writer .write on line 272, the whole script runs (including reading 10k source rows) in under 5 seconds.
 
Computername is MONOLITH
Executing query to NetSuite...
Target result column structure=customer_id(int8)
Table Column[customer_id]
Table Column[date_last_modified]
PrimaryKey: 
DB Status: powell  Connected: true on session 8048  DB version: POSTGRESQL.9.5 Autocommit status: undefined  javaConn.getAutoCommit()=false
.......... 
.......... 
.......... 
.......... 
.......... 
.......... 
.......... 
.......... 
.......... 
.......... 
Read 10000 source rows and 0 target rows; 10000 rows inserted, 0 rows updated, 2 commits, 0 rollbacks
Script execution time: 4833
*** Script Completed ***
 

The table itself is trivial, without even a primary key.  It is truncated before running the script.

CREATE TABLE nsrep.keylist_customers  ( 
   customer_id        bigint NOT NULL,
   date_last_modified timestamp NULL 
   )
GO

 

4 attachments

Issue #15429

Closed
Fixed
Resolved 2017-08-17T03:09:52Z
 
 
Completion
No due date
Fixed Build ADS 18.0.18-4, ADS 19.0.0-beta-40
No time estimate

About AquaClusters Privacy Policy Support Version - 19.0.2-4 AquaFold, Inc Copyright © 2007-2017