diff options
author | drh <> | 2024-03-18 18:00:17 +0000 |
---|---|---|
committer | drh <> | 2024-03-18 18:00:17 +0000 |
commit | 43a511927d1656ae73fdb808abdbc61d836b9668 (patch) | |
tree | be0f5c77c855b4eb43475bb939a7eec9d723d501 /src/printf.c | |
parent | d31fc6e9cfd4d25d2fdea2f5aa41fee0a1d5e80c (diff) | |
parent | 2ad2584581992f59543bc00c3be313d29448aeb0 (diff) | |
download | sqlite-43a511927d1656ae73fdb808abdbc61d836b9668.tar.gz sqlite-43a511927d1656ae73fdb808abdbc61d836b9668.zip |
Add the "VALUES-as-coroutine" optimization. Large VALUES clauses on an
INSERT, for example, prepare and run in about half the time and with half
the memory. This check-in also includes enhancements to the internal
sqlite3ExprIsConstant() routine to recognize pure SQL functions as constant
if they have constant arguments.
FossilOrigin-Name: a120c9235f125e05be494038c16a9dd326fd79837698bef17e7879cd0cd75831
Diffstat (limited to 'src/printf.c')
-rw-r--r-- | src/printf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/printf.c b/src/printf.c index 186e95bb8..eb22ee320 100644 --- a/src/printf.c +++ b/src/printf.c @@ -860,6 +860,10 @@ void sqlite3_str_vappendf( assert( pSel!=0 ); if( pSel->selFlags & SF_NestedFrom ){ sqlite3_str_appendf(pAccum, "(join-%u)", pSel->selId); + }else if( pSel->selFlags & SF_MultiValue ){ + assert( !pItem->fg.isTabFunc && !pItem->fg.isIndexedBy ); + sqlite3_str_appendf(pAccum, "%u-ROW VALUES CLAUSE", + pItem->u1.nRow); }else{ sqlite3_str_appendf(pAccum, "(subquery-%u)", pSel->selId); } |