Extension talk:Wikibase QueryEngine/SQL schema proposal

Some comments
Aaron (talk) 00:07, 8 November 2013 (UTC)
 * wbq_entities
 * Seems OK, description is a bit terse
 * Are 'id' values thinks like Q ? Can NUMERIC be used instead?
 * Can constants be used for 'type' so it can be UNSIGNED INT?
 * wbq_mainsnak_
 * Same stuff with 'id' field as above
 * PRIMARY KEY is kind of long, especially for the expected table size, unless the index is well sorted for full-row lookups of the vast majority of queries, it might make sense to just make this UNIQUE and pick another index (or surrogate) to be the PRIMARY. The hash column could save some space as base36.
 * wbq_qualifier_
 * (similar to above)
 * wbq_ _string
 * (similar to above)
 * Also, how big can 'value' be? I care more if it will be indexed.
 * wbq_ _entityid
 * What is the PRIMARY KEY?
 * wbq_ _time
 * I guess that would need a surrogate key
 * wbq_ _quantity
 * I guess that would need a surrogate key
 * I wonder if RTREE indexes might be useful, depending on the final column layout, this kind of table is tricky SQL
 * wbq_ _geo
 * I guess that would need a surrogate key
 * Would be nice to see the proposed index statements (would some use RTREE?), this is another tricky one
 * Why is 'alt' deprecated?
 * wbq_valueless_snaks
 * Blobs in the Primary Key are a little worrying, actually why are they not varbinary? Even still, it would make the PRIMARY kind of long