OLD | NEW |
1 # 2014-06-17 | 1 # 2014-06-17 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #************************************************************************* | 10 #************************************************************************* |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 AND t3.flg7 = 1 | 217 AND t3.flg7 = 1 |
218 AND t1.did = t2.did | 218 AND t1.did = t2.did |
219 AND t2.uid = t3.uid | 219 AND t2.uid = t3.uid |
220 ORDER BY t1.ptime desc LIMIT 500; | 220 ORDER BY t1.ptime desc LIMIT 500; |
221 } {0 0 0 {SEARCH TABLE t1 USING INDEX t1x1 (ptime>?)} 0 1 1 {SEARCH TABLE t2 USI
NG INDEX t2x0 (did=?)} 0 2 2 {SEARCH TABLE t3 USING INDEX t3x0 (uid=?)}} | 221 } {0 0 0 {SEARCH TABLE t1 USING INDEX t1x1 (ptime>?)} 0 1 1 {SEARCH TABLE t2 USI
NG INDEX t2x0 (did=?)} 0 2 2 {SEARCH TABLE t3 USING INDEX t3x0 (uid=?)}} |
222 # | 222 # |
223 # ^^^--- Before being fixed, the above was using an automatic covering | 223 # ^^^--- Before being fixed, the above was using an automatic covering |
224 # on t3 and reordering the tables so that t3 was in the outer loop and | 224 # on t3 and reordering the tables so that t3 was in the outer loop and |
225 # implementing the ORDER BY clause using a B-Tree. | 225 # implementing the ORDER BY clause using a B-Tree. |
226 | 226 |
227 do_execsql_test autoindex2-120 { | |
228 EXPLAIN QUERY PLAN | |
229 SELECT | |
230 t1_id, | |
231 t1.did, | |
232 param2, | |
233 param3, | |
234 t1.ptime, | |
235 t1.trange, | |
236 t1.exmass, | |
237 t1.mass, | |
238 t1.vstatus, | |
239 type, | |
240 subtype, | |
241 t1.deviation, | |
242 t1.formula, | |
243 dparam1, | |
244 reserve1, | |
245 reserve2, | |
246 param4, | |
247 t1.last_operation, | |
248 t1.admin_uuid, | |
249 t1.previous_value, | |
250 t1.job_id, | |
251 client_did, | |
252 t1.last_t1, | |
253 t1.data_t1, | |
254 t1.previous_date, | |
255 param5, | |
256 param6, | |
257 mgr_uuid | |
258 FROM | |
259 t3, | |
260 t2, | |
261 t1 | |
262 WHERE | |
263 t1.ptime > 1393520400 | |
264 AND param3<>9001 | |
265 AND t3.flg7 = 1 | |
266 AND t1.did = t2.did | |
267 AND t2.uid = t3.uid | |
268 ORDER BY t1.ptime desc LIMIT 500; | |
269 } {0 0 2 {SEARCH TABLE t1 USING INDEX t1x1 (ptime>?)} 0 1 1 {SEARCH TABLE t2 USI
NG INDEX t2x0 (did=?)} 0 2 0 {SEARCH TABLE t3 USING INDEX t3x0 (uid=?)}} | |
270 | |
271 finish_test | 227 finish_test |
OLD | NEW |