Re: Need help about mysql order and index....
Okay is not a reply for myself :) is only for add a question... :) I read that mysql 4 will fix this, but mysql 4 is stable? I mean i'm on production, i'm not selling mysql :) I mean I have a big projet in test using mysql.. so if it crash it will be very bad for me... someone had test mysql 4? stable or not? :) Jean-Francois Dionne - Original Message - From: Jean-Francois Dionne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 7:25 PM Subject: Need help about mysql order and index Hi there, I hope someone will can help me... First, sorry for bad english :) i'm french First all I have those index in my table +---+---+-++ --+-++--++ -- + | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Comment | +---+---+-++ --+-++--++ -- + | Stats | 0 | PRIMARY |1| ID | A | 4568748 | NULL | NULL| | | Stats | 1 | Port_ID |1| Port_ID | A | 1 | NULL | NULL| | | Stats | 1 | Timestamp |1| Timestamp | A | 49126 | NULL | NULL| | +---+---+-++ --+-++--++ -- + You have to know I have 4 500 000 in my db Okay I have this query: select Timestamp from Stats use index (Timestamp) where Timestamp = '2002-01-01' and Timestamp '2002-02-01' order by Timestamp limit 1; this one is jsut doing fine.. it take 0.00 sec to do it... but select Timestamp from Stats use index (Timestamp) where Timestamp = '2002-01-01' and Timestamp '2002-02-01' order by Timestamp desc limit 1; this one take sometime 10 sec to do I understand is the desc the prob.. because my index is in asc (collation=A) my question is... is there a way for maiking a index in desc? or maybe something else? Jean-Francois Dionne Yard - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Need help about mysql order and index....
Bonjour Jean-françois, Le DESC qui utilise l'INDEX est un fonction de MySQL 4.0. Il y a un bug en la version 4.0.1 (Quelque fois il n'utilise pas l'index descendre ) mais pour la plus part ça marche bien. En autre il y a un forum de MySQL en français à: Liens utils : Poster un message: [EMAIL PROTECTED] S'abonner: [EMAIL PROTECTED] Se désabonner : [EMAIL PROTECTED] Ecrire au proprio : [EMAIL PROTECTED] URL sur Onelist : http://www.onelist.com/community/mysql-france Bonne chance, Amicalement, Ken - Original Message - From: Jean-Francois Dionne [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 14, 2002 7:25 PM Subject: Need help about mysql order and index Hi there, I hope someone will can help me... First, sorry for bad english :) i'm french First all I have those index in my table +---+---+-++-- -- --+-++--+--- -+-- + | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Comment | +---+---+-++-- -- --+-++--+--- -+-- + | Stats | 0 | PRIMARY |1| ID | A | 4568748 | NULL | NULL| | | Stats | 1 | Port_ID |1| Port_ID | A | 1 | NULL | NULL| | | Stats | 1 | Timestamp |1| Timestamp | A | 49126 | NULL | NULL| | +---+---+-++-- -- --+-++--+--- -+-- + You have to know I have 4 500 000 in my db Okay I have this query: select Timestamp from Stats use index (Timestamp) where Timestamp = '2002-01-01' and Timestamp '2002-02-01' order by Timestamp limit 1; this one is jsut doing fine.. it take 0.00 sec to do it... but select Timestamp from Stats use index (Timestamp) where Timestamp = '2002-01-01' and Timestamp '2002-02-01' order by Timestamp desc limit 1; this one take sometime 10 sec to do I understand is the desc the prob.. because my index is in asc (collation=A) my question is... is there a way for maiking a index in desc? or maybe something else? Jean-Francois Dionne Yard - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Need help about mysql order and index....
Hi there, I hope someone will can help me... First, sorry for bad english :) i'm french First all I have those index in my table +---+---+-++ --+-++--++-- + | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Comment | +---+---+-++ --+-++--++-- + | Stats | 0 | PRIMARY |1| ID | A | 4568748 | NULL | NULL| | | Stats | 1 | Port_ID |1| Port_ID | A | 1 | NULL | NULL| | | Stats | 1 | Timestamp |1| Timestamp | A | 49126 | NULL | NULL| | +---+---+-++ --+-++--++-- + You have to know I have 4 500 000 in my db Okay I have this query: select Timestamp from Stats use index (Timestamp) where Timestamp = '2002-01-01' and Timestamp '2002-02-01' order by Timestamp limit 1; this one is jsut doing fine.. it take 0.00 sec to do it... but select Timestamp from Stats use index (Timestamp) where Timestamp = '2002-01-01' and Timestamp '2002-02-01' order by Timestamp desc limit 1; this one take sometime 10 sec to do I understand is the desc the prob.. because my index is in asc (collation=A) my question is... is there a way for maiking a index in desc? or maybe something else? Jean-Francois Dionne Yard - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php