[PDB-1224] Move fact path reference from the fact_values table to the facts table Created: 2015/02/10 Updated: 2015/05/05 Resolved: 2015/03/30
|Fix Version/s:||PDB 2.3.1|
|Reporter:||Ryan Senior||Assignee:||Rob Browning|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
|Sprint:||PuppetDB 2015-02-25, PuppetDB 2015-03-11, PuppetDB 2015-03-25, PuppetDB 2015-04-08|
Although our current table structure is more efficient from a space perspective, it's more costly to query. We should create a migration that drops the fact path id from the fact_values table and instead have the facts table point at both the fact value and the fact path along with the factset. A quick first pass at this migration will allow the fact diffing logic to be updated in parallel. Care needs to be taken that we do this migration efficiently and quickly as it will be adding a new (populated, non-null) column on a table that is potentially very large.
|Comment by Rob Browning [ 2015/02/17 ]|
Tested several approaches and settled on creating a migration facts table explicitly from scratch for now. We just drop the dead columns from the other tables since that should be quite cheap with postgresql.
Current version of the code should be here:
and the original master version:
Note that this code will break puppetdb until