I have 2 tables in MySql
Table_A { pk_A VARCHAR 150 PRIMARY KEY, random_data } ~ 9500 rows
Table_B { pk_B VARCHAR 150, more_random_data } ~ 50000 rows
Relationship between them is one-to-many, pk_A will be found multiple times in Table_B on col pk_B.
My problem is:
if i enable indexing on pk_B , php/mysql CRUD works fine, but a JOIN or anyother query from command line involving both tables takes a long time
if i disable indexing on pk_B, php/mysql CRUD becomes laggish, but a JOIN or anyother query from command line involving both tables is instantaneous
How can i improve my database performance (i could modify my pk's from varchar to int(11)) but i wondered if there are other workarounds available
Thanks