mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Improvements to the EXPLAIN QUERY PLAN output for EXISTS-to-JOIN.
FossilOrigin-Name: 6b1ecbaa2ee405be040901dceac45d027d35c313622748ba4dbbd404e297a7fa
This commit is contained in:
@@ -126,7 +126,6 @@ void sqlite3WhereAddExplainText(
|
||||
#endif
|
||||
{
|
||||
VdbeOp *pOp = sqlite3VdbeGetOp(pParse->pVdbe, addr);
|
||||
|
||||
SrcItem *pItem = &pTabList->a[pLevel->iFrom];
|
||||
sqlite3 *db = pParse->db; /* Database handle */
|
||||
int isSearch; /* True for a SEARCH. False for SCAN. */
|
||||
@@ -135,7 +134,6 @@ void sqlite3WhereAddExplainText(
|
||||
#if defined(SQLITE_DEBUG) && !defined(SQLITE_OMIT_EXPLAIN)
|
||||
char *zMsg; /* Text to add to EQP output */
|
||||
#endif
|
||||
const char *zFormat;
|
||||
StrAccum str; /* EQP output string */
|
||||
char zBuf[100]; /* Initial space for EQP output string */
|
||||
|
||||
@@ -150,14 +148,10 @@ void sqlite3WhereAddExplainText(
|
||||
|
||||
sqlite3StrAccumInit(&str, db, zBuf, sizeof(zBuf), SQLITE_MAX_LENGTH);
|
||||
str.printfFlags = SQLITE_PRINTF_INTERNAL;
|
||||
if( pItem->fg.fromExists ){
|
||||
zFormat = "SINGLETON %S";
|
||||
}else if( isSearch ){
|
||||
zFormat = "SEARCH %S";
|
||||
}else{
|
||||
zFormat = "SCAN %S";
|
||||
}
|
||||
sqlite3_str_appendf(&str, zFormat, pItem);
|
||||
sqlite3_str_appendf(&str, "%s %S%s",
|
||||
isSearch ? "SEARCH" : "SCAN",
|
||||
pItem,
|
||||
pItem->fg.fromExists ? " EXISTS" : "");
|
||||
if( (flags & (WHERE_IPK|WHERE_VIRTUALTABLE))==0 ){
|
||||
const char *zFmt = 0;
|
||||
Index *pIdx;
|
||||
|
Reference in New Issue
Block a user