So basically the same table is shared by many client with a foreign key that identifies which data belongs to whom
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
As far as I know MySQL does not have any way of showing internal resource usage by user, database, or table let alone usage by a certain key in a table. When you say "storage" do you mean on-disk storage or in-memory resource usage? The former will be much easier to get than the latter especially since it item in question is one table and its resources will likely be shared among "clients".
A few ideas you can consider in roughly increasing order of difficulty:
SELECT COUNT(*) FROM table WHERE id=XXX). This gets harder if the record has variable sized fields but it would give you a rough estimate on the total size used by each client. Note that this just gives you the database size on disk and not what is actually currently in use (a 1G table might have use near zero resources if it is never used).
I would start by looking at exactly why you need to know resource usage on a per client basis. Do you actually want to know the resources per client or just know how many queries they are running? If you just want to know the storage required per client then a simple/complex SELECT query to count records and field sizes would suffice.