Hi Karl-
I often use a unix timestamp value for my dates (an unsigned mediumint is
adequate) and index that. However, using date/time functions in the where
clause does have a significant impact on the execution times, even when the
index is used and the EXPLAIN output appears the same. See examp
On 1 Jul 2003 at 10:28, Karl J. Stubsjoen wrote:
> > 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?
>
> submitdate happens to be a DATETIME field.
> Your suggested query
Keith,
> 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?
submitdate happens to be a DATETIME field.
Your suggested query doesn't pull any results. Must I convert the field
first?
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