I would like to get rid of obsolete "observed" hands after 6 months or so, and am considering following the advice in this tutorial: Managing Multipe Databases
However, from my research here and my own guessing, I believe there are these limitations:
- HUD will combine data from multiple DBs but if there are any duplicate hands the stats will be inaccurate
- HUD may suffer in performance if querying multiple DBs
- Reports can only be run on a single active database
It seems like this should be pretty easy to do with a delete query, except for the part about knowing whether it's an "observed" or "played" hand.
In my pig-latin SQL, what I want to do is:
- Code: Select all
DELETE (all hand related records) OLDER THAN (some date) UNLESS (one of hero's aliases was at the table)
Can this be done, and if so -- pushing my luck :) -- what would that query look like?
Finally, can such a query be executed from within PT3, or if not is there a postgreSQL utility that can do it?
