s4
changeset 569:81b5ec847687
Turn off debug sql logging
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Tue, 23 Apr 2019 09:22:17 +0900 |
parents | 3cb5c360e1bf |
children | 9328392f7c55 |
files | s4-funcs.sh |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line diff
1.1 --- a/s4-funcs.sh Mon Apr 22 12:03:16 2019 +0900 1.2 +++ b/s4-funcs.sh Tue Apr 23 09:22:17 2019 +0900 1.3 @@ -3170,12 +3170,13 @@ 1.4 1.5 -- ${ddd:+.system gdate +%T.%3N >> tmp/d1} 1.6 DROP TABLE IF EXISTS _news; 1.7 + DROP VIEW IF EXISTS _news; 1.8 1.9 -- CREATE TEMPORARY TABLE _news($_i, newcnt); 1.10 - -- INSERT INTO _news 1.11 + -- INSERT INTO _news 1.12 /* **COMPARE** the efficiency of TEMP-TABLE and VIEW !!! */ 1.13 - CREATE VIEW _news AS ( 1.14 - SELECT a.id, coalesce(newcnt, 0) newcnt 1.15 + CREATE TEMPORARY VIEW _news AS 1.16 + SELECT a.id $_i, coalesce(newcnt, 0) newcnt 1.17 FROM (SELECT DISTINCT id FROM _target) 1.18 a LEFT JOIN 1.19 (SELECT $_i, count(ctime) newcnt 1.20 @@ -3184,7 +3185,7 @@ 1.21 WHERE tblrowid=x.trowid), 1.22 '1970-01-01') 1.23 GROUP BY $_i) b 1.24 - ON a.id=b.$_i); 1.25 + ON a.id=b.$_i; 1.26 -- ${ddd:+.system gdate +%T.%3N >> tmp/d1} 1.27 EOF 1.28 # REMOVE next line until 2019/5/1 1.29 @@ -3249,8 +3250,8 @@ 1.30 `cat $sqlfile` 1.31 EOF 1.32 if [ "$ddd" ]; then # REMOVE this block until 2019/7/1 1.33 - rm -f tmp/sql; cat $sqlfile >> tmp/sql 1.34 err "----- `gdate +%FT%T.%3N` ------------555555aaaaa" 1.35 + cat $sqlfile >> tmp/sql 1.36 # query ".read $sqlfile" > $tmpd/foo 1.37 sqlite3 -header -cmd 'pragma foreign_keys=ON' $db ".read $sqlfile" > $tmpd/foo 1.38 cp $tmpd/foo tmp/