Hello,

If you aim for for absolute control over the storage (the fileystem
nature is the limit), and speed, do not use an SQL system.  Of course,
you would have to face all the trouble of writing your own
mini-engine/subsystem for the job. It all comes down to what your
needs are and how much time you can spend on it.

If you want to use SQL, but do not wish to get down to milisecond
level, use a simple INT UNSIGNED, in conjuction with either
UNIX_TIMESTAMP or your favorite time() call equivalent in your
language. Thats 4 bytes.


Mark

On Wed, 24 Nov 2004 14:53:08 +0100, Jose Antonio <[EMAIL PROTECTED]> wrote:
> I need to store huge data series using MySQL with InnoDB as storage
> engine. The data type of the parameters can be double, float, int,
> smallint, mediumint, tinyint .... So, I've thought to store them in
> the following way:
> 
> Table Parameter:
> Parameter ID - small int
> Parameter Name - varchar(8)
> Parameter Description - varchar(16)
> Parameter dbType - varchar(10)
> 
> Table floatParameter:
> Parameter ID - small int
> Datetime - datetime or long
> Parameter value - float
> 
> etc ....
> 
> for the Datetime field .... is it better to use the MySQL built-in
> DATETIME type, or is it better to save a long (as milliseconds)?
> 
> The required hard-disk storage by a 'datetime' is the same as for a 'long'?
> Is there any different in the performance?
> 
> The queries I will be doing more often are similar to this one:
> "SELECT datetime, value FROM floatParameter WHERE datetime BETWEEN
> '2004-10-01 00:00:00' and '2004-10-15 00:00:00'"
> 
> Discussion is open and suggestions are more than welcome.
> 
> Jose.
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 


-- 
Mark Papadakis
Head of R&D
Phaistos Networks, S.A

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to