Subject | Re: Is this possible ? |
---|---|
Author | emb_blaster |
Post date | 2010-05-31T17:37:58Z |
--- In firebird-support@yahoogroups.com, "svanderclock" <svanderclock@...> wrote:
I am thinking if you can't split this in 2 tables. Making a 1-1 relation this can near solve your problem of make a table with much data get harder to control. Maybe you can also create a View that put all that data united as it was in only one table. But you should think: Will I need always data of the integer fields? If the answer is "Yes!", then you will probably find this suggestion as a "not good". :)
Else, this will also help in performance when searching for the data without the integers fiels as FB will not need to read that part of data.
I know that these 25 fields is fast to read. But when you think that this is on a talbe with more than 50 000 000 rows and in that table theres much more data, then it can seems a good way to do.
Also that other suggestion of work with a Interger like it was a set of tinyIntegers can be a good advice.
kind regards,
>Hi Stephen,
> hello,
>
> I need to store 25 values (integer) in 25 differents fields.
> all the value are from 0 to 255 (8bit). their will be at the end more than 50 000 000 rows in the table !
>
> What field definition to choose to store only 8 bit ?
>
> after i will select the field only in the way
>
> select ID from table colors where
> color1 > 120 and color1 < 140 and
> color2 > 160 and color2 < 180 and
> color3 > 60 and color3 < 80 and
> ...
> color25 > 20 and color25 < 40;
>
> is this will be acceptable under firebird ?
> or too much heavy ? did i will need to create only
> one multi column index or 25 single column index ?
>
I am thinking if you can't split this in 2 tables. Making a 1-1 relation this can near solve your problem of make a table with much data get harder to control. Maybe you can also create a View that put all that data united as it was in only one table. But you should think: Will I need always data of the integer fields? If the answer is "Yes!", then you will probably find this suggestion as a "not good". :)
Else, this will also help in performance when searching for the data without the integers fiels as FB will not need to read that part of data.
I know that these 25 fields is fast to read. But when you think that this is on a talbe with more than 50 000 000 rows and in that table theres much more data, then it can seems a good way to do.
Also that other suggestion of work with a Interger like it was a set of tinyIntegers can be a good advice.
kind regards,