I'm using mariadb.
I have a single table that keeps track of video_count
and image_count
for a few different sites. I.e.
type | enum('SITE1','SITE2','SITE3')
video_count | int(11)
image_count | int(11)
video_count
will exist for ALL sites but image_count
only exists for SITE3
. Also, SITE3 will be a minority of rows.
So does it make sense to arrange the data this way on one table?
I'd like to query ALL rows...but is it a problem if it's redundant and expensive knowing that 90% of my rows will have 0
for image_count?
It'd be perfect if I could do something like SELECT * from TABLE BUT DON't GET video_count WHERE type != 'SITE3'"
Is that even a possible query in SQL? Or does it now make sense to create separate tables for 'SITE1...SITEN'? Ty!
image_counts
..will this lead to scalability issue...(seeing as it's redundant knowing they'll always be 0)type
thePRIMARY KEY
??