An example for the year 2026
100.000 threads
10 search "objects" in three forums with different "objects" to search.
Threads in forum one have colors like "blue, green, red"
Threads in Forum two have numbers like "10, 20, 30"
Threads in Forum three have mixed values like "blue, red, 20, 30"
Values could be checkboxes and radios or integers like year of production "1964"
1. I add ten new fields to xf_thread, fields are indexed and save integers.
select from where field1 == 1 AND/OR field3==3
1b.) same/same, but I select where field1 = "red" <= use char or enum?
1c. I can use bitfields to sum some values
1=red, 2=blue,4=green;
If I need red, blue, I can search for "3"
If I need blue and green, I can search for 7
Integer, indexed, best solution?
2. I can use custom_fields with one value, to select from custom_field_values with
select where field1 == "s1:1"; (something equal like this)
3. I can use checkboxes to search again in custom_field_values with
select where field1 like "s:1%1%" (something like that!)
From my point of view as someone who knows nothing:
4. Worst solution to search in textfield with like %text%
3. search in custom_fields_values with == on short columns, but many of them! for every thread you have maybe 5-10 values, then join threads?
2. indexed integers in the main table? but i give every thread ten new fields?! If used or not? Good idea?
1. indexed integers in the main table, but I reduce the needed fields by bitfields
Now, please, tell me, what should I do?
Hey, your website has 100 uniques per day, why do you think about this? Use custom_fields with checkboxes!
Hey, dont make yourself problems! If you have these numbers of users, buy a bigger server and don't care!
Hey, if you can solve this with bitfields just do! It is the best solution!
Hey, make it more complicated! Use new tables for your forums!
Forum 1 needs thread_id, blue, red, green => can be a bitfield! => thread_id, color_code
Forum2 needs some numbers! You can also make bitfields! => thread_id, number_code
Forum3 needs a combination! You can make two fields! => thread_id, number_code, color_code
Forum1, search in table1
Forum2, search in table2
Forum3, search in table3
and left join your threads!
Hey, this is ********! Use bitfields in the main_table! thread_id is anyway there, no join! Just add number_code, color_code;
The real world example?
none to eight colors! Could by 256 bits! Easy doing for green and red and blue = 1+2+4 = 7; but what we do with green or red or blue? 1 or 2 or 3 or 4 or 5 or 6 or 7 or just <=7; but will not help with 1+4+16; then you need = x or y or z; better to ask for one field if one or more of three values or select for three fields? (here 8!)
Year of production
Year for "produced since"
status 1 or 2 or 3
price1
price2
kg, length, height, width
text1 *
text2 *
text3 *
* searchable for stuff only
Another thread nobody can follow? I am sorry, it is sooooo clear! You don't think so.
100.000 threads
10 search "objects" in three forums with different "objects" to search.
Threads in forum one have colors like "blue, green, red"
Threads in Forum two have numbers like "10, 20, 30"
Threads in Forum three have mixed values like "blue, red, 20, 30"
Values could be checkboxes and radios or integers like year of production "1964"
1. I add ten new fields to xf_thread, fields are indexed and save integers.
select from where field1 == 1 AND/OR field3==3
1b.) same/same, but I select where field1 = "red" <= use char or enum?
1c. I can use bitfields to sum some values
1=red, 2=blue,4=green;
If I need red, blue, I can search for "3"
If I need blue and green, I can search for 7
Integer, indexed, best solution?
2. I can use custom_fields with one value, to select from custom_field_values with
select where field1 == "s1:1"; (something equal like this)
3. I can use checkboxes to search again in custom_field_values with
select where field1 like "s:1%1%" (something like that!)
From my point of view as someone who knows nothing:
4. Worst solution to search in textfield with like %text%
3. search in custom_fields_values with == on short columns, but many of them! for every thread you have maybe 5-10 values, then join threads?
2. indexed integers in the main table? but i give every thread ten new fields?! If used or not? Good idea?
1. indexed integers in the main table, but I reduce the needed fields by bitfields
Now, please, tell me, what should I do?
Hey, your website has 100 uniques per day, why do you think about this? Use custom_fields with checkboxes!
Hey, dont make yourself problems! If you have these numbers of users, buy a bigger server and don't care!
Hey, if you can solve this with bitfields just do! It is the best solution!
Hey, make it more complicated! Use new tables for your forums!
Forum 1 needs thread_id, blue, red, green => can be a bitfield! => thread_id, color_code
Forum2 needs some numbers! You can also make bitfields! => thread_id, number_code
Forum3 needs a combination! You can make two fields! => thread_id, number_code, color_code
Forum1, search in table1
Forum2, search in table2
Forum3, search in table3
and left join your threads!
Hey, this is ********! Use bitfields in the main_table! thread_id is anyway there, no join! Just add number_code, color_code;
The real world example?
none to eight colors! Could by 256 bits! Easy doing for green and red and blue = 1+2+4 = 7; but what we do with green or red or blue? 1 or 2 or 3 or 4 or 5 or 6 or 7 or just <=7; but will not help with 1+4+16; then you need = x or y or z; better to ask for one field if one or more of three values or select for three fields? (here 8!)
Year of production
Year for "produced since"
status 1 or 2 or 3
price1
price2
kg, length, height, width
text1 *
text2 *
text3 *
* searchable for stuff only
Another thread nobody can follow? I am sorry, it is sooooo clear! You don't think so.