Javier Diaz wrote:
EXPLAIN SELECT * FROM process_times
WHERE date <= date_sub(now(), INTERVAL 2 day)
date_idx,date_proc_idx
(NULL)
10778561
EXPLAIN SELECT * FROM process_times
WHERE date = date_sub(now(), INTERVAL 2 day)
date_idx,date_proc_idx
date_idx
1863456
My
NDITIONS]
Thanks a lot for your help
Javier
-Original Message-
From: Jigal van Hemert [mailto:[EMAIL PROTECTED]
Sent: 05 January 2006 14:39
To: Javier Diaz
Cc: Aftab Khan; mysql@lists.mysql.com
Subject: Re: Problems with indexes on Date/DateTime fields
Javier Diaz wrote:
> I would
Javier Diaz wrote:
I would like to know if there is any problem which cause Mysql to not
use date indexes at least you use the "=" operator, because if that is
the case we will need to re-visit a few queries
If you do a select instead of a delete, will the index be used? (You can
check th
hat is
the case we will need to re-visit a few queries
Thx
Javier
-Original Message-
From: Aftab Khan [mailto:[EMAIL PROTECTED]
Sent: 05 January 2006 11:25
To: Javier Diaz
Subject: RE: Problems with indexes on Date/DateTime fields
I agree. Some time full table scan is faster than
avier
-Original Message-
From: Aftab Khan [mailto:[EMAIL PROTECTED]
Sent: 05 January 2006 11:03
To: Javier Diaz
Subject: Re: Problems with indexes on Date/DateTime fields
Is not the second quary doing a full table scan? The
parser may find this better than using the Index.
--- Javier
Hi all
We are having a weird problem with some queries which are not using some
indexes in date fields.
Query-1
SELECT [field list] FROM tableX
WHERE dateField = [any date expression or constant value]
Query-2
SELECT [field list] FROM tableX
WHERE dateField <= [any date expression or constant
Brian Erickson wrote:
We have a table that has two datetime fields (start_time and
end_time). We'd like to be able to calculate the number of seconds
between these two fields in a query. However, a simple "end_time -
start_time" does not yield a correct result.
SELECT start
PM
Subject: # Seconds between two datetime fields
> We have a table that has two datetime fields (start_time and
> end_time). We'd like to be able to calculate the number of seconds
> between these two fields in a query. However, a simple "end_time -
> start_time" does n
We have a table that has two datetime fields (start_time and
end_time). We'd like to be able to calculate the number of seconds
between these two fields in a query. However, a simple "end_time -
start_time" does not yield a correct result.
SELECT start_time, end_time, end_time -
On Wednesday 11 December 2002 12:44, Tom Roos wrote:
> i want to build a query in which i have 2 datetime fields which i subtract
> from one another. what is the result set? is it in (milli)seconds, is it a
> unix timestamp?
> what type of convertion do i have to apply to report the d
On Wed, 2002-12-11 at 04:44, Tom Roos wrote:
> hi
>
> i want to build a query in which i have 2 datetime fields which i subtract
> from one another. what is the result set? is it in (milli)seconds, is it a
> unix timestamp? what type of convertion do i have to apply to report th
hi
i want to build a query in which i have 2 datetime fields which i subtract
from one another. what is the result set? is it in (milli)seconds, is it a
unix timestamp? what type of convertion do i have to apply to report the
difference in minutes?
tks
tom
clarify exactly what you mean. show an example.. you
question is confusing.
cw
--- shahana qureshi <[EMAIL PROTECTED]> wrote:
> Please tell me how can I get the date and time
> values
> diffently in a single query from 'DateTime' field
> and the difference of two D
Please tell me how can I get the date and time values
diffently in a single query from 'DateTime' field
and the difference of two DateTime fields in HH:MM:SS
format.
Thanks
shahana
__
Do you Yahoo!?
New DSL Internet Access from SBC &am
Try this:
select * from my_table order by my_datetime ASC;
select * from my_table order by my_datetime DESC;
Cheers,
T
On Thursday 01 November 2001 06:15 am, brainheap wrote:
> Hi ppl!
>
> I have a table with datetime type column in it.
>
>
> when I make request "select * from
select * from my_table order by my_datetime DESC
-Original Message-
From: brainheap [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 01, 2001 5:16 AM
To: MySQL mailing list
Subject: newby question about datetime fields
Hi ppl!
I have a table with datetime type column in it.
when
> Hi ppl!
>
> I have a table with datetime type column in it.
>
>
> when I make request "select * from my_table order by my_datetime"
>
> I get the normal sort i.e. first the oldest dates but I want to get
> reverse sort to have most recent dates to be the first.
>
> How can I do this?
http:
Hi ppl!
I have a table with datetime type column in it.
when I make request "select * from my_table order by my_datetime"
I get the normal sort i.e. first the oldest dates but I want to get
reverse sort to have most recent dates to be the first.
How can I do this?
Thanks for any help :0)
Al
Hi!
>>>>> "Sinisa" == Sinisa Milivojevic <[EMAIL PROTECTED]> writes:
Sinisa> Arturs Aboltins writes:
>> From: [EMAIL PROTECTED]
>> To: [EMAIL PROTECTED]
>> Subject: MYSQL bug with if and datetime fields
>>
>> >Description:
&
Arturs Aboltins writes:
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: MYSQL bug with if and datetime fields
>
> >Description:
> In queries where datetime field is in "WHERE" condition, the same
> field
> in "IF" sta
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: MYSQL bug with if and datetime fields
>Description:
In queries where datetime field is in "WHERE" condition, the same
field
in "IF" statement causes incorrect query
ect: Difference of two datetime fields.
> Hello,
> How could I obtain the difference of two datetime fields giving the result
> in seconds, like the function datediff in MSsql ?
> I tried date_sub but I had no success.
> Ex: 2001-02-16 15:00:00 - 2001-02-16 14:00:00=3600 se
Hello,
How could I obtain the difference of two datetime fields giving the result
in seconds, like the function datediff in MSsql ?
I tried date_sub but I had no success.
Ex: 2001-02-16 15:00:00 - 2001-02-16 14:00:00=3600 seconds
Thanks,
Laercio Brehmer
CIASC
[EMAIL PROTECTED
23 matches
Mail list logo