Is it possible to get the disk space used by a given result set? Say if I wanted to select from a table where user id = X, in order to calculate database disk usage for a user? Ideally I’d like to figure out the disk usage for any result set, programmatically.
Share
Then there is definitively no way to get this information, unless the vendor’s database implementation exposes it somehow. (And I’ve not heard of any vendor database that does.)
The best you could do would be to do an estimate based on deep knowledge of how the vendor database represents data on disk. And given the various tuning options that a typical database provides, just getting a reliable estimate would be a lot of work to implement.