Thread:Help talk:Fixed properties/Considerations for assigning fixed property?/reply

First of all I am no MySQL expert, that said fixed properties is an experimental feature I did in my GSoC project and its performance benefits yet to be analysed.


 * 1. How important is the datatype?

SMW has dedicated tables for each datatype. 'smw_di_bool' would be the name of the table for booleans having three attributes s_id (ID of the page), p_id (ID of the property), o_value (true or false). Now if you have a fixed property of the same type it would only have two fields s_id and o_value - that's because we already know the property. Therefore, in queries we have one less thing to compare; this is one benefit if you have lots of properties for the same datatype. This could be the queries used to display the Property:Page for that boolean property

Using fixed_table: Select s_id, o_value from fixed_table

Not using fixed_table: Select s_id, o_value from boolean_table where p_id=ID_OF_THE_PROPERTY


 * 2. does it increase the number of joins that the database has to do?

Yes, in some cases it would. But I am unsure about the tradeoffs here as I haven't yet dealt with complex SQL generated from queries. Let's ask Markus :)

I hope you and everybody understands that all the predefined properties (Modification date, redirects, etc ) already are fixed properties having their own dedicated tables.