On 6/5/15 6:51 AM, Joel Jacobson wrote:
1. I think it would be helpful for DBAs to better understand their own system. Finding unused *tables* is today easy thanks to pg_stat_*_tables, but knowing if something is accessing a *column* or not is not easy. In my case all our database access is via sprocs, so I can just grep the source code for the column name to see if something is using it, but most DBAs probably don't have that luxury.
I have wanted this exact thing when considering vertical partitioning. It's easy to tell from a size standpoint what columns are good candidates for putting in a 'side table', but it's very hard to know how often columns are actually used.
BTW, I think the right way to measure this would be how many rows were returned for queries referencing a column. Simply knowing how many queries reference a column doesn't tell you much; you want to know how much column data was actually pulled out.
-- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers