Hello
I'm writing a program that makes an analysis of a structure/model. A user can fill in 526 different choices and gets feedback.
The feedback depends on what choices he made and what choices can not be chosen together (the rules).
(ex: choice 10,112,65 and 123 can not occur together)
every choice is a row in a table in mysql.
every rule is a row in another table in mysql.
The amout of possible rules is about 300 billion. Of course there aren't that much rules. But at this time there is no way of finding out how much rules there will be.
The problem is that i have to compare every rule and check if it occurs in the filled in table of a user. And i don't know how much time this will take.
And now the questions;
-how much space does a table or row takes? how many MB is a mysql table? Is it 1MB for 100 rows or 1MB for 10000 rows or...?
-is it a good manner to check how long it takes for 50 rules to be checked and then double that time for 100 rules and triple it for 150...and so on? Is this going to be lineair or exponential relation between the amout of rules to be checked and the time?
-should i read the filled in model in an array and the rules in an other and compre them in php or is it better to do that in mysql and return an array of the comparison (rules that occur)
Thanks
Roel
I'm writing a program that makes an analysis of a structure/model. A user can fill in 526 different choices and gets feedback.
The feedback depends on what choices he made and what choices can not be chosen together (the rules).
(ex: choice 10,112,65 and 123 can not occur together)
every choice is a row in a table in mysql.
every rule is a row in another table in mysql.
The amout of possible rules is about 300 billion. Of course there aren't that much rules. But at this time there is no way of finding out how much rules there will be.
The problem is that i have to compare every rule and check if it occurs in the filled in table of a user. And i don't know how much time this will take.
And now the questions;
-how much space does a table or row takes? how many MB is a mysql table? Is it 1MB for 100 rows or 1MB for 10000 rows or...?
-is it a good manner to check how long it takes for 50 rules to be checked and then double that time for 100 rules and triple it for 150...and so on? Is this going to be lineair or exponential relation between the amout of rules to be checked and the time?
-should i read the filled in model in an array and the rules in an other and compre them in php or is it better to do that in mysql and return an array of the comparison (rules that occur)
Thanks
Roel