SELECT sum(numlog) FROM table1 WHERE date IN (SELECT date from temptable)
This looks like a great idea at first glance, but there's a bug that makes it less than optimal. In MySQL, a query with a subquery does not use an index in the outer query.
In reply to Re^2: Perl and MySQL woes
by kyle
in thread Perl and MySQL woes
by cosmicperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |