• R/O
  • SSH

execsql-upsert: 提交

Default repository for the execsql-upsert scripts


Commit MetaInfo

修訂8c636a69de575affccaa8275911607b76d1ef4f3 (tree)
時間2020-05-10 01:33:04
作者Dreas Nielsen <dreas.nielsen@gmai...>
CommiterDreas Nielsen

Log Message

Modified progress bar display for better performance.

Change Summary

差異

diff -r 98d0a593abe0 -r 8c636a69de57 CHANGELOG.rst
--- a/CHANGELOG.rst Tue Apr 28 17:38:28 2020 -0700
+++ b/CHANGELOG.rst Sat May 09 09:33:04 2020 -0700
@@ -1,6 +1,7 @@
11 ======== ========== =================================================================================
22 Version Date Features
33 ======== ========== =================================================================================
4+2.0.1 2020-05-09 Modified progress bar display for better performance when the console is on.
45 2.0.0 2019-05-23 Added the UPDTPK_ONE script to update primary keys in a single table.
56 1.4.2 2019-05-01 Corrected use of 'trim()' in ss_upsert.sql.
67 1.4.1 2019-03-24 Modified MariaDB script to restrict data pulled from the information_schema for primary key checks to the current database.
diff -r 98d0a593abe0 -r 8c636a69de57 upsert/md_upsert.sql
--- a/upsert/md_upsert.sql Tue Apr 28 17:38:28 2020 -0700
+++ b/upsert/md_upsert.sql Sat May 09 09:33:04 2020 -0700
@@ -143,6 +143,8 @@
143143 -- 2019-06-16 Nominally complete revisions of PK updating scripts. RDN.
144144 -- 2019-06-23 Completed debugging of PK updating scripts. RDN.
145145 -- 2020-04-28 Explicitly rolled back the changes if 'do_commit' = "No". RDN.
146+-- 2020-05-09 Moved the assignment of 'upsert_progress_denom' out of the
147+-- 'update_console_qa' script. RDN.
146148 -- ==================================================================
147149
148150
@@ -1824,12 +1826,8 @@
18241826
18251827 -- !x! BEGIN SCRIPT QA_ALL with parameters (stage_pfx, control_table)
18261828
1827--- Initialize the status and progress bars if the console is running.
1828--- !x! begin script update_console_qa with parameters (check_type, control_table)
1829+-- Get denominator for progress bar if console is on.
18291830 -- !x! if(console_on)
1830- -- !x! reset counter 221585944
1831- -- !x! console status "Performing !!#check_type!! QA checks"
1832- -- !x! console progress 0
18331831 -- !x! if(view_exists(ups_upsert_rows))
18341832 drop view if exists ups_upsert_rows;
18351833 -- !x! endif
@@ -1838,6 +1836,14 @@
18381836 from !!#control_table!!;
18391837 -- !x! subdata upsert_progress_denom ups_upsert_rows
18401838 -- !x! endif
1839+
1840+-- Initialize the status and progress bars if the console is running.
1841+-- !x! begin script update_console_qa with parameters (check_type)
1842+-- !x! if(console_on)
1843+ -- !x! reset counter 221585944
1844+ -- !x! console status "Performing !!#check_type!! QA checks"
1845+ -- !x! console progress 0
1846+-- !x! endif
18411847 -- !x! end script
18421848
18431849 -- Create a list of the selected tables with a loop control flag.
@@ -1865,17 +1871,17 @@
18651871 limit 1;
18661872
18671873 -- Perform null QA checks on all tables.
1868--- !x! execute script update_console_qa with args (check_type=NULL, control_table=!!#control_table!!)
1874+-- !x! execute script update_console_qa with args (check_type=NULL)
18691875 -- !x! execute script qa_all_nullloop with (stage_pfx=!!#stage_pfx!!, control_table=!!#control_table!!)
18701876
18711877 -- Perform primary key QA checks on all tables.
18721878 update ups_proctables set processed = 0;
1873--- !x! execute script update_console_qa with args (check_type="primary key", control_table=!!#control_table!!)
1879+-- !x! execute script update_console_qa with args (check_type="primary key")
18741880 -- !x! execute script qa_all_pkloop with (stage_pfx=!!#stage_pfx!!, control_table=!!#control_table!!)
18751881
18761882 -- Perform foreign key QA checks on all tables.
18771883 update ups_proctables set processed = 0;
1878--- !x! execute script update_console_qa with args (check_type=foreign key, control_table=!!#control_table!!)
1884+-- !x! execute script update_console_qa with args (check_type=foreign key)
18791885 -- !x! execute script qa_all_fkloop with (stage_pfx=!!#stage_pfx!!, control_table=!!#control_table!!)
18801886
18811887
diff -r 98d0a593abe0 -r 8c636a69de57 upsert/pg_upsert.sql
--- a/upsert/pg_upsert.sql Tue Apr 28 17:38:28 2020 -0700
+++ b/upsert/pg_upsert.sql Sat May 09 09:33:04 2020 -0700
@@ -155,6 +155,8 @@
155155 -- 2019-05-30 Added UPDTPKQA_ONE through check #8. ES.
156156 -- 2019-06-03 Completed UPDTPKQA_ONE and added UPDTPKQA_ONE_INNERLOOP. ES.
157157 -- 2020-04-28 Explicitly rolled back the changes if 'do_commit' = "No". RDN.
158+-- 2020-05-09 Moved the assignment of 'upsert_progress_denom' out of the
159+-- 'update_console_qa' script. RDN.
158160 -- ==================================================================
159161
160162
@@ -1771,18 +1773,22 @@
17711773
17721774 -- !x! BEGIN SCRIPT QA_ALL with parameters (base_schema, staging, control_table)
17731775
1774--- Initialize the status and progress bars if the console is running.
1775--- !x! begin script update_console_qa with parameters (check_type, control_table)
1776+-- Get denominator for progress bar if console is on.
17761777 -- !x! if(console_on)
1777- -- !x! reset counter 221585944
1778- -- !x! console status "Performing !!#check_type!! QA checks"
1779- -- !x! console progress 0
17801778 drop view if exists ups_upsert_rows;
17811779 create temporary view ups_upsert_rows as
17821780 select count(*) + 1 as upsert_rows
17831781 from !!#control_table!!;
17841782 -- !x! subdata upsert_progress_denom ups_upsert_rows
17851783 -- !x! endif
1784+
1785+-- Initialize the status and progress bars if the console is running.
1786+-- !x! begin script update_console_qa with parameters (check_type)
1787+-- !x! if(console_on)
1788+ -- !x! reset counter 221585944
1789+ -- !x! console status "Performing !!#check_type!! QA checks"
1790+ -- !x! console progress 0
1791+-- !x! endif
17861792 -- !x! end script
17871793
17881794 -- Create a list of the selected tables with a loop control flag.
@@ -1807,19 +1813,19 @@
18071813 limit 1;
18081814
18091815 -- Perform null QA checks on all tables.
1810--- !x! execute script update_console_qa with args (check_type=NULL, control_table=!!#control_table!!)
1816+-- !x! execute script update_console_qa with args (check_type=NULL)
18111817 -- !x! execute script qa_all_nullloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!)
18121818
18131819
18141820 -- Perform primary QA checks on all tables.
18151821 update ups_proctables set processed = False;
1816--- !x! execute script update_console_qa with args (check_type=primary key, control_table=!!#control_table!!)
1822+-- !x! execute script update_console_qa with args (check_type=primary key)
18171823 -- !x! execute script qa_all_pkloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!)
18181824
18191825
18201826 -- Perform foreign key QA checks on all tables.
18211827 update ups_proctables set processed = False;
1822--- !x! execute script update_console_qa with args (check_type=foreign key, control_table=!!#control_table!!)
1828+-- !x! execute script update_console_qa with args (check_type=foreign key)
18231829 -- !x! execute script qa_all_fkloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!)
18241830
18251831 -- Update the status bar if the console is running.
diff -r 98d0a593abe0 -r 8c636a69de57 upsert/ss_upsert.sql
--- a/upsert/ss_upsert.sql Tue Apr 28 17:38:28 2020 -0700
+++ b/upsert/ss_upsert.sql Sat May 09 09:33:04 2020 -0700
@@ -126,6 +126,8 @@
126126 -- 2019-05-29 Corrections to comments. ES.
127127 -- 2019-06-03 Correction to logging in UPDTPKQA_ONE_INNERLOOP. ES.
128128 -- 2020-04-28 Explicitly rolled back the changes if 'do_commit' = "No". RDN.
129+-- 2020-05-09 Moved the assignment of 'upsert_progress_denom' out of the
130+-- 'update_console_qa' script. RDN.
129131 -- ==================================================================
130132
131133 -- ################################################################
@@ -1919,19 +1921,22 @@
19191921
19201922 -- !x! BEGIN SCRIPT QA_ALL with parameters (base_schema, staging, control_table)
19211923
1922-
1923--- Initialize the status and progress bars if the console is running.
1924--- !x! begin script update_console_qa with parameters (check_type, control_table)
1924+-- Get denominator for progress bar if console is on.
19251925 -- !x! if(console_on)
1926- -- !x! reset counter 221585944
1927- -- !x! console status "Performing !!#check_type!! QA checks"
1928- -- !x! console progress 0
19291926 if object_id('tempdb..#ups_upsert_rows') is not null drop table #ups_upsert_rows;
19301927 select count(*) + 1 as upsert_rows
19311928 into #ups_upsert_rows
19321929 from !!#control_table!!;
19331930 -- !x! subdata upsert_progress_denom #ups_upsert_rows
19341931 -- !x! endif
1932+
1933+-- Initialize the status and progress bars if the console is running.
1934+-- !x! begin script update_console_qa with parameters (check_type)
1935+-- !x! if(console_on)
1936+ -- !x! reset counter 221585944
1937+ -- !x! console status "Performing !!#check_type!! QA checks"
1938+ -- !x! console progress 0
1939+-- !x! endif
19351940 -- !x! end script
19361941
19371942 -- Create a list of the selected tables with a loop control flag.
@@ -1958,18 +1963,18 @@
19581963 -- !x! end script
19591964
19601965 -- Perform null QA checks on all tables.
1961--- !x! execute script update_console_qa with args (check_type=NULL, control_table=!!#control_table!!)
1966+-- !x! execute script update_console_qa with args (check_type=NULL)
19621967 -- !x! execute script qa_all_nullloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!)
19631968
19641969
19651970 -- Perform primary QA checks on all tables.
19661971 update #ups_proctables set processed = 0;
1967--- !x! execute script update_console_qa with args (check_type=primary key, control_table=!!#control_table!!)
1972+-- !x! execute script update_console_qa with args (check_type=primary key)
19681973 -- !x! execute script qa_all_pkloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!)
19691974
19701975 -- Perform foreign key QA checks on all tables.
19711976 update #ups_proctables set processed = 0;
1972--- !x! execute script update_console_qa with args (check_type=foreign key, control_table=!!#control_table!!)
1977+-- !x! execute script update_console_qa with args (check_type=foreign key)
19731978 -- !x! execute script qa_all_fkloop with (base_schema=!!#base_schema!!, staging=!!#staging!!, control_table=!!#control_table!!)
19741979
19751980
Show on old repository browser