3 ms·
As text or XML column type. IME a document store or columnar backend is significantly cheaper if you're not querying it from SQL.
by paulryanrogers 3mo ago
As text or XML column type. IME a document store or columnar backend is significantly cheaper if you're not querying it from SQL.
- vivzkestrel 3mo ago- there is definitely one dilemma here - if you split the rss document into its "items" i am not sure if you can store each item separately inside postgres using that XML data type - if you store the whole document, you end up with a problem when say the feed partially updates after a few minutes - one suggestion i hear from r/PostgreSQL is that you store the XML blob somewhere else like hstore or something and somehow index it back to postgres. I wonder how that works conceptually / architecturally speaking
- paulryanrogers 3mo agoPg can do array columns, though I don't think it's a good fit for common use cases
- zaptheimpaler 3mo agoThe data is probably small enough and infrequently updated such that almost anything will work. If you split the items then you would have a separate episodes table with one row per episode joined to the podcasts table. If you store the whole XML in a row then you can overwrite the row when the feed changes. Doing the parsing and splitting into episodes in DB sounds better to me because your clients will otherwise constantly be repeating that work.