Re: Query takes terribly long

2004-09-20 Thread Dirk Schippers
swer for '2004-02-29'. Of course, if you really want just the data for the same day last year, you could use SELECT id FROM story WHERE putdatetime >= '2003-09-19' and putdatetime < '2003-09-20' AND put=1 AND front=1 AND (MONTH(putdatetime) <> 2 OR DA

Re: Query takes terribly long

2004-09-20 Thread Dirk Schippers
Note that you still get the rignt answer for '2004-02-29'. Of course, if you really want just the data for the same day last year, you could use SELECT id FROM story WHERE putdatetime >= '2003-09-19' and putdatetime < '2003-09-20' AND put=1 AND front

Re: Query takes terribly long

2004-09-19 Thread Dirk Schippers
celyn Fournier www.presence-pc.com ----- Original Message - From: "Dirk Schippers" <[EMAIL PROTECTED]> To: "Jocelyn Fournier" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, September 19, 2004 5:49 PM Subject: Re: Query takes terribly long Hello, Indee

Re: Query takes terribly long

2004-09-19 Thread Dirk Schippers
query, you will see MySQL will use the index (put, front, topcategory, putdatetime) without filesorting. Regards, Jocelyn Fournier www.presence-pc.com - Original Message ----- From: "Dirk Schippers" <[EMAIL PROTECTED]> To: "Jocelyn Fournier" <[EMAIL PROTECTED]>

Re: Query takes terribly long

2004-09-19 Thread Dirk Schippers
QL query cache now ? (try RESET QUERY CACHE before testing your query to be sure) Regards, Jocelyn Fournier www.presence-pc.com - Original Message - From: "Dirk Schippers" <[EMAIL PROTECTED]> To: "Jocelyn Fournier" <[EMAIL PROTECTED]> Cc: <[EMAIL PR

Re: Query takes terribly long

2004-09-19 Thread Dirk Schippers
he other key. Dirk. Jocelyn Fournier wrote: Are you sure this not because your query is cached by the MySQL query cache now ? (try RESET QUERY CACHE before testing your query to be sure) Regards, Jocelyn Fournier www.presence-pc.com - Original Message - From: "Dirk Schippers" &l

Re: Query takes terribly long

2004-09-18 Thread Dirk Schippers
rieve the row in the right order directly. Regards, Jocelyn Fournier www.presence-pc.com - Original Message - From: "Dirk Schippers" <[EMAIL PROTECTED]> To: "Jocelyn Fournier" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, Septembe

Re: Query takes terribly long

2004-09-18 Thread Dirk Schippers
data returned. (I assume you're using MySQL 4.x) Regards, Jocelyn Fournier www.presence-pc.com - Original Message - From: "Dirk Schippers" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, September 18, 2004 10:25 PM Subject: Query takes terribly long

Re: Query takes terribly long

2004-09-18 Thread Dirk Schippers
No, it doesn't improve the speed. I think that is because almost all rows in that table are approved. Are you also convinced that this is a very long time for such a query? Or is it normal? Andrew Kreps wrote: On Sat, 18 Sep 2004 22:25:12 +0200, Dirk Schippers <[EMAIL PROTECTED]> wro

Query takes terribly long

2004-09-18 Thread Dirk Schippers
of the total of 18818). The table will certainly grow a lot in the future so I am very worried about the performance. What can I do about this? Is there any way to improve this? Enabling the cache is not an option as the data in the table is altered a lot. Anyone? Dirk. -- Schippers Dirk Zaakv

Re: INSERT on duplicate UPDATE?

2004-09-14 Thread Dirk Schippers
I think what you mean is REPLACE. Try http://dev.mysql.com/doc/mysql/en/REPLACE.html Yves Goergen wrote: Hi, I can vaguely remember there was something like "INSERT... on duplicate key UPDATE..." in MySQL, but the documentation search is almost as useful as I'm used to - it cannot tell me anyth

MySQL speed

2004-09-14 Thread Dirk Schippers
think that Oracle is that much smarter than MySQL. Can anyone tell me what's going on? Are there MySQL parameters that can improve things? Or is MySQL really that slow? I won't believe the last one... I tested these queries on a MySQL 3.3 and a MySQL 4.0 database, all with the same sp