Performance of Junction Tables vs. Serialized Arrays with very large tables

Before I start, yes, I know serialized arrays in a MySQL table to refer to other keys is a cardinal sin punishable by death. =p

However, I just wanted to ask if it ever might become better for performance.

So, say I have 10,000,000 users, and I have a table of 10,000,000 things, and for some incredible reason those all need to be junctioned together.

That would give the table 100,000,000,000,000 rows.

Now, if I were to do a serialized array, it would still be at only 10,000,000 rows, much smaller.

Would this extreme case still be better off with junction tables, or would arrays be (from a strictly performance standpoint, I know it would suck not being able to do proper left joins and such).

Thanks.

if you ever plan to search within the serialized array for a specific value, you’ll get a table scan

so if that’s acceptable performance, you’ve answered your own question

:slight_smile: