我有这张桌子(eod):
| eod_id | company_symbol | date | open | close | high | low |
| 1 | AAA | 01-01-2000 | 40.00 | 42.00 | 43.00 | 39.00 |
我使用这 3 个请求:
1. SELECT COUNT(*) FROM eod WHERE company_symbol="AAA" AND CLOSE>OPEN
AND DATE BETWEEN "0000-00-00" AND "0000-00-00";
2. SELECT COUNT(*) FROM eod WHERE company_symbol="AAA" AND CLOSE<OPEN
AND DATE BETWEEN "0000-00-00" AND "0000-00-00";
3. SELECT min(date), max(date) FROM eod WHERE company_symbol="AAA"
每个请求大约需要 0.7 秒才能执行,所以我想减少每个请求的时间。我该如何处理?是否可以只在一个中完成两个第一个请求?
在此先感谢您的帮助,
史蒂夫