enable prune unstable path for table use default statistics
This commit is contained in:
		| @ -37,107 +37,107 @@ Outputs & filters: | ||||
|  | ||||
| explain select * from t1 where c1 = 1; | ||||
| Query Plan | ||||
| =================================== | ||||
| |ID|OPERATOR  |NAME|EST. ROWS|COST| | ||||
| ----------------------------------- | ||||
| |0 |TABLE SCAN|t1  |1        |2   | | ||||
| =================================== | ||||
| ===================================== | ||||
| |ID|OPERATOR  |NAME  |EST. ROWS|COST| | ||||
| ------------------------------------- | ||||
| |0 |TABLE SCAN|t1(k1)|1        |5   | | ||||
| ===================================== | ||||
|  | ||||
| Outputs & filters:  | ||||
| ------------------------------------- | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter([t1.c1 = 1]), rowset=256,  | ||||
|       access([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter(nil), rowset=256, | ||||
|       access([t1.__pk_increment], [t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|  | ||||
| explain select * from t1 where c1 < 1; | ||||
| Query Plan | ||||
| =================================== | ||||
| |ID|OPERATOR  |NAME|EST. ROWS|COST| | ||||
| ----------------------------------- | ||||
| |0 |TABLE SCAN|t1  |1        |2   | | ||||
| =================================== | ||||
| ===================================== | ||||
| |ID|OPERATOR  |NAME  |EST. ROWS|COST| | ||||
| ------------------------------------- | ||||
| |0 |TABLE SCAN|t1(k1)|1        |5   | | ||||
| ===================================== | ||||
|  | ||||
| Outputs & filters:  | ||||
| ------------------------------------- | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter([t1.c1 < 1]), rowset=256,  | ||||
|       access([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter(nil), rowset=256, | ||||
|       access([t1.__pk_increment], [t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|  | ||||
| explain select * from t1 where c1 > 1; | ||||
| Query Plan | ||||
| =================================== | ||||
| |ID|OPERATOR  |NAME|EST. ROWS|COST| | ||||
| ----------------------------------- | ||||
| |0 |TABLE SCAN|t1  |1        |2   | | ||||
| =================================== | ||||
| ===================================== | ||||
| |ID|OPERATOR  |NAME  |EST. ROWS|COST| | ||||
| ------------------------------------- | ||||
| |0 |TABLE SCAN|t1(k1)|1        |5   | | ||||
| ===================================== | ||||
|  | ||||
| Outputs & filters:  | ||||
| ------------------------------------- | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter([t1.c1 > 1]), rowset=256,  | ||||
|       access([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter(nil), rowset=256, | ||||
|       access([t1.__pk_increment], [t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|  | ||||
| explain select * from t1 where c1 > 1 and c1 < 10; | ||||
| Query Plan | ||||
| =================================== | ||||
| |ID|OPERATOR  |NAME|EST. ROWS|COST| | ||||
| ----------------------------------- | ||||
| |0 |TABLE SCAN|t1  |1        |2   | | ||||
| =================================== | ||||
| ===================================== | ||||
| |ID|OPERATOR  |NAME  |EST. ROWS|COST| | ||||
| ------------------------------------- | ||||
| |0 |TABLE SCAN|t1(k1)|1        |5   | | ||||
| ===================================== | ||||
|  | ||||
| Outputs & filters:  | ||||
| ------------------------------------- | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter([t1.c1 > 1], [t1.c1 < 10]), rowset=256,  | ||||
|       access([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter(nil), rowset=256, | ||||
|       access([t1.__pk_increment], [t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|  | ||||
| explain select * from t1 where c1 = 1 and c2 < 1; | ||||
| Query Plan | ||||
| =================================== | ||||
| |ID|OPERATOR  |NAME|EST. ROWS|COST| | ||||
| ----------------------------------- | ||||
| |0 |TABLE SCAN|t1  |1        |2   | | ||||
| =================================== | ||||
| ===================================== | ||||
| |ID|OPERATOR  |NAME  |EST. ROWS|COST| | ||||
| ------------------------------------- | ||||
| |0 |TABLE SCAN|t1(k2)|1        |5   | | ||||
| ===================================== | ||||
|  | ||||
| Outputs & filters:  | ||||
| ------------------------------------- | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter([t1.c2 < 1], [t1.c1 = 1]), rowset=256,  | ||||
|       access([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter(nil), rowset=256, | ||||
|       access([t1.__pk_increment], [t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|  | ||||
| explain select * from t1 where c1 = 1 and c2 = 1; | ||||
| Query Plan | ||||
| =================================== | ||||
| |ID|OPERATOR  |NAME|EST. ROWS|COST| | ||||
| ----------------------------------- | ||||
| |0 |TABLE SCAN|t1  |1        |2   | | ||||
| =================================== | ||||
| ===================================== | ||||
| |ID|OPERATOR  |NAME  |EST. ROWS|COST| | ||||
| ------------------------------------- | ||||
| |0 |TABLE SCAN|t1(k2)|1        |5   | | ||||
| ===================================== | ||||
|  | ||||
| Outputs & filters:  | ||||
| ------------------------------------- | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter([t1.c1 = 1], [t1.c2 = 1]), rowset=256,  | ||||
|       access([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter(nil), rowset=256, | ||||
|       access([t1.__pk_increment], [t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|  | ||||
| explain select * from t1 where c1 = 1 and c2 = 1 and c3 < 1; | ||||
| Query Plan | ||||
| =================================== | ||||
| |ID|OPERATOR  |NAME|EST. ROWS|COST| | ||||
| ----------------------------------- | ||||
| |0 |TABLE SCAN|t1  |1        |2   | | ||||
| =================================== | ||||
| ===================================== | ||||
| |ID|OPERATOR  |NAME  |EST. ROWS|COST| | ||||
| ------------------------------------- | ||||
| |0 |TABLE SCAN|t1(k3)|1        |5   | | ||||
| ===================================== | ||||
|  | ||||
| Outputs & filters:  | ||||
| ------------------------------------- | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter([t1.c3 < 1], [t1.c1 = 1], [t1.c2 = 1]), rowset=256,  | ||||
|       access([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter(nil), rowset=256, | ||||
|       access([t1.__pk_increment], [t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|  | ||||
| explain select * from t1 where c1 = 1 and c2 = 1 and c3 = 1; | ||||
| Query Plan | ||||
| =================================== | ||||
| |ID|OPERATOR  |NAME|EST. ROWS|COST| | ||||
| ----------------------------------- | ||||
| |0 |TABLE SCAN|t1  |1        |3   | | ||||
| =================================== | ||||
| ===================================== | ||||
| |ID|OPERATOR  |NAME  |EST. ROWS|COST| | ||||
| ------------------------------------- | ||||
| |0 |TABLE SCAN|t1(k3)|1        |5   | | ||||
| ===================================== | ||||
|  | ||||
| Outputs & filters:  | ||||
| ------------------------------------- | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter([t1.c1 = 1], [t1.c2 = 1], [t1.c3 = 1]), rowset=256,  | ||||
|       access([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|   0 - output([t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), filter(nil), rowset=256, | ||||
|       access([t1.__pk_increment], [t1.c1], [t1.c2], [t1.c3], [t1.c4], [t1.c5], [t1.c6], [t1.c7], [t1.c8], [t1.c9], [t1.c10]), partitions(p0) | ||||
|  | ||||
| explain select count(*) from t2; | ||||
| Query Plan | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 obdev
					obdev