/ Artifact [07edd854]
Login

Artifact 07edd854b59ef3e7ac718f2906c53e0112c3915b:

Ticket change [07edd854] - New ticket [13f033c8] Performance regression. by drh 2010-08-04 18:43:50.
D 2010-08-04T18:43:50
J comment Consider\sthe\sfollowing\sSQL:\r\n\r\n<blockquote><pre>\r\nCREATE\sTABLE\st1(a\sINTEGER\sPRIMARY\sKEY,b,c);\r\nCREATE\sINDEX\st1c\sON\st1(c);\r\nINSERT\sINTO\st1\sVALUES(1,2,3);\r\nCREATE\sTABLE\st2(x,\sy);\r\nANALYZE;\r\nUPDATE\ssqlite_stat1\sSET\sstat='20000\s100';\r\nexplain\squery\splan\r\nSELECT\s*\sFROM\st2,\st1\sWHERE\st2.x=5\sAND\st1.a=t2.y;\r\n</pre></blockquote>\r\n\r\nThe\sSELECT\sat\sthe\send\sshould\sideally\sdo\sa\sfull\stable\sscan\sover\stable\sT2\r\nand\sthen\suse\sthe\sPRIMARY\sKEY\sto\slook\sup\sentries\sof\sT1,\sresulting\sin\r\nan\sO(NlogN)\sexecution\stime.\s\sHowever,\sbeginning\swith\sSQLite\sversion\s3.7.0\r\n(and\sspecifically\scheck-in\s[defaf0d99a807]\son\s[2010-04-15\s01:04:54],\s\r\nthe\squery\splanner\sdoes\stwo\sfull\stable\sscans\son\sT1\sfirst\sand\sthen\sT2\sas\r\nthe\sinner\sloop,\sresulting\san\sO(N**2)\sexecution\stime.
J detected Application_Fault
J foundin 3.7.0
J severity Important
J status Open
J subsystem Code_Generator
J title Performance\sregression
J type Code_Defect
K 13f033c865f878953fb0412b389dd1d1143d1dce
U drh
Z ca0ee89493ca5b4f433c57540501a604