List:General Discussion« Previous MessageNext Message »
From:BAUMEISTER Alexandre Date:November 1 1999 3:08pm
Subject:Re[2]: Maybe a BUG in dates ordering ...
View as plain text  
Bonjour sinisa,

sccc> Hi Alex, how are you ??

  Well, thanks :)  And you ?

sccc> First of all, try this:

sccc> select unix_timestamp(date) as xx from intraday_PAR where
sccc> symbole='1rpfte' order by xx;

  I tried this, but it doesn't solve the problem. Still some
  errors in order.

sccc> Second run isamchk on the table.

  The table is re-created each morning (drop + create) and then,
  all day long some data are recorded in the table (about 1 per minute
  per symbol with about 2000 symbols).

  As the table is a new one each morning I don't think that indexes
  can be corrupted or something like that.

  The error occurs when the system become a little loaded (many
  requests per seconds).

  It is Mysql 3.22.26a under Solaris 2.6 .

  We tried a lot of things like order on date, order on unix_timestamp
  ... but as soon as there are a lot of requests, Mysql results are no
  more well ordered.


> Hi,
 > 
 >   I have a problem with order on dates with Mysql 3.22.26a .
 > 
 >   Below is the description of a table which contains about 80000 rows.
 > 
 >   The table was created with :
 > 
 > create table intraday_PAR (
 >   symbole char(20) NOT NULL,
 >   date datetime NOT NULL,
 >   first real(17,5) NOT NULL,
 >   high real(17,5) NOT NULL,
 >   low real(17,5) NOT NULL,
 >   last real(17,5) NOT NULL,
 >   volume int NOT NULL,
 >   unique(symbole,date),
 >   index idx_symbole (symbole),
 >   index idx_date (date)
 > );
 > 
 > 
 >   The table is doped an re-created each morning and filled with data
 >   all day long (these are shares quotations informations).
 > 
 >   Everything works quite well, but when the server on which is hosted
 >   the database becomes a little loaded, the we have some strange
 >   ordering results from Mysql.
 > 
 >   Maybe a bug ? Any idea ?
 > 
 > mysql> desc intraday_PAR;
 > mysql> +---------+--------------+------+-----+---------------------+-------+
 > mysql> | Field   | Type         | Null | Key | Default             | Extra |
 > mysql> +---------+--------------+------+-----+---------------------+-------+
 > mysql> | symbole | char(20)     |      | PRI |                     |       |
 > mysql> | date    | datetime     |      | PRI | 0000-00-00 00:00:00 |       |
 > mysql> | first   | double(17,5) |      |     | 0.00000             |       |
 > mysql> | high    | double(17,5) |      |     | 0.00000             |       |
 > mysql> | low     | double(17,5) |      |     | 0.00000             |       |
 > mysql> | last    | double(17,5) |      |     | 0.00000             |       |
 > mysql> | volume  | int(11)      |      |     | 0                   |       |
 > mysql> +---------+--------------+------+-----+---------------------+-------+
 > mysql> 7 rows in set (0.00 sec)
 > 
 > mysql> select unix_timestamp(date) from intraday_PAR where symbole='1rpfte' order
by
date;
 > mysql> +----------------------+
 > mysql> | unix_timestamp(date) |
 > mysql> +----------------------+
 > mysql> |            941179740 |
 > mysql> |            941180400 |  <----------
 > mysql> |            941266860 |  <----------
 > mysql> |            941180520 |  <----------
 > mysql> |            941180580 |
 > mysql> |            941180640 |
 > mysql> |            941180700 |
 > mysql> |            941180760 |
 > mysql> |            941180820 |
 > mysql> |            941180880 |
 > mysql> |            941180940 |
 > mysql> |            941181000 |
 > mysql> |            941181060 |
 > mysql> |            941181120 |
 > mysql> |            941181180 |
 > mysql> |            941181240 |
 > mysql> |            941181300 |
 > mysql> |            941181360 |
 > mysql> |            941181420 |
 > mysql> |            941181480 |
 > mysql> |            941181540 |
 > mysql> |            941181600 |
 > mysql> |            941181660 |
 > mysql> |            941181720 |
 > mysql> |            941181780 |
 > mysql> |            941181840 |
 > mysql> |            941181900 |
 > mysql> |            941181960 |
 > mysql> |            941182020 |
 > ........
 > mysql> 466 rows in set (0.00 sec)
 > 
 > 
 > 
 >   Regards,
 >   Alex.
 > 
 > 


Hi Alex, how are you ??

First of all, try this:

select unix_timestamp(date) as xx from intraday_PAR where
symbole='1rpfte' order by xx;

Second run isamchk on the table.

Sinisa

+----------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___     ==  mysql@stripped            |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped|
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
|             /*/             \*\                Developers Team       |
+----------------------------------------------------------------------+


Thread
Maybe a BUG in dates ordering ...BAUMEISTER Alexandre29 Oct
  • Re: Maybe a BUG in dates ordering ...sinisa29 Oct
    • Re[2]: Maybe a BUG in dates ordering ...BAUMEISTER Alexandre1 Nov
      • Re[2]: Maybe a BUG in dates ordering ...Michael Widenius26 Nov