On 1 Jul 2003 at 9:25, Karl J. Stubsjoen wrote:
> ROWS: 34,000 + searched
> explain
> select
> a.submitid,a.url,a.submitdate,a.name,a.company,a.address1,a.city,a.sta
> te,a.z
> ipcode,a.country,a.email,a.phone,a.keywords,a.title,a.description,a.su
> bmitte dby from submit as a inner join re_idx as b on a.submitid =
> b.submitid where year(a.submitdate)=2003 and month(a.submitdate)=7
> and dayofmonth(a.submitdate)=1; --and year(a.submitdate)=2003 and
> month(a.submitdate)=7 and dayofmonth(a.submitdate)<15;
>
> Notice the 2nd where statement, this is how I typically do my date
> queries (and it is slow). This is because I might also be searching
> for a range of dates (as in the commented out "and" clause above).
The normal way to do a search for a range of dates would be
... WHERE a.submitdate BETWEEN '2003-07-01' AND '2003-07-14';
Is that what you're looking for?
--
Keith C. Ivey <keith@stripped>
Tobacco Documents Online
http://tobaccodocuments.org