postgresql-obsidian icon indicating copy to clipboard operation
postgresql-obsidian copied to clipboard

Change json to jsonb type

Open maksim77 opened this issue 2 years ago • 0 comments

Thanks for the great plugin! It seems to me that it doesn't make sense to use JSON type to store metainformation data. JSONB essentially has only one disadvantage over JSON, which is write speed. But with as much data as in Obsidian storage it shouldn't make any difference. But the speed and capabilities of the binary format is significantly better. You can read some details for example here.

For users who already have databases created, you can probably add a line to the migrate function. But here I'm not sure, because this ALTER will be done for each insertion into the database

ALTER TABLE obsidian.file ALTER COLUMN dataview_data TYPE JSONB;

maksim77 avatar Jul 07 '23 10:07 maksim77