Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Chris_Elders_VZ
Contributor II
Contributor II

How can I optimize load

With the script below I am trying to create a table that looks at the previous month and current months data.  I am extracting the previous month because I will need to overwrite the previous month when month end close occurs.  The Variable in the script is '2020-10-01' as a reference point.  The about of data for each month is around 23-25million records each and it takes over 1.5 hours to extract.   Is there coding that I can use to optimize the load time?  The total number of fields when I do "select *" is about 100 fields.

LIB CONNECT TO 'EDW_EQUIP';

// MASTER MONTHLY BASE TABLE
wSAP_FACT_V_CURRENT:
select * from FINMAP_PRD_SECVM.wSAP_FACT_V

WHERE WSAP_POST_MTH>='$(VPERIOD)';

STORE * FROM wSAP_FACT_V_CURRENT INTO 'LIB://EQUIP/EQUIP_REPORTING_QVD/MASTERS/MONTHLY/wSAP_FACT_V_CURRENT.QVD'(QVD);

 

Labels (2)
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Does the database table have an index for the WSAP_POST_MTH column? If not, creating an index on this column or using an already indexed column would speed up the query. 

-Rob

View solution in original post

1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Does the database table have an index for the WSAP_POST_MTH column? If not, creating an index on this column or using an already indexed column would speed up the query. 

-Rob