| Marostegui added a comment. |
In T159718#3079126, @WMDE-leszek wrote:Thank you @jcrespo and @Marostegui for your comments. I am happy I asked and you made me sketch the whole big plan.
As you might have realized , I am really not a DB expert. Therefore some not smart things in the plan :)
That's what we are here for: to help, and what you did was exactly what we normally want, get involved in the early stages so we can provide our point of view and give some more context to the db-land! :-)
I really had no good reason for renaming the column, neither for creating indexes later. It just seemed "easier" that way. I agree with all you said @jcrespo, thanks for providing clear arguments. Our code will also be simpler the way you suggested, I think.
I am going to bring your plan below to the whole developer team. For now I don't see any reason not to do it that way.
- Create a new column with new indexes
- Populate new column at the same time than the current one (ideally with code, but if you do not want to touch code, it can even be made with a trigger) + populate old values with maintenance
- Deploy the new code using only the new column
- At some point in the future, drop the old column (it can be made all null and it will save space already) -low priority
Regarding int to string change: Yes, it will be changes like 123 -> 'Q123', and 456 -> 'P456'.
Is it done with maint script or with trigger, it does not matter much from our perspective. We'll do it the way you guys says is the best for this. Writing a maint PHP script for doing this is clearly something we're capable of :)
I would go for the option to populate from the code if, as you said, you guys don't mind writing some extra code :-)
Cc: jcrespo, Marostegui, Lydia_Pintscher, Aklapper, daniel, WMDE-leszek, Minhnv-2809, D3r1ck01, Izno, Luke081515, Wikidata-bugs, aude, Mbch331, Jay8g, Krenair
_______________________________________________ Wikidata-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs
