Welcome Guest, Not a member yet? Register   Sign In
How to structure the database - MYSQL performance question
#3

(09-30-2015, 07:20 AM)Narf Wrote: Absolutely. You should create the appropriate indexes depending on the queries that you'd execute, and the same goes for performance optimizations via restructuring.

I had been reading up on just that yesterday. I don't yet know myself exactly what queries I'll running.

(09-30-2015, 07:20 AM)Narf Wrote: You can't optimize the data itself and by itself for anything else than size, which you already know as normalization. Not knowing what kind of lookups you'd be doing on it, we can't give you any meaningful advice on how to structure it.

To give an example, here's two queries that are currently in the code. There will be certainly be more complex queries that will be written:

Code:
$airports_list = $this->airports_model->select('airport')->find_all();
$countries_list = $this->airports_model->select('country')->group_by('country')->find_all();

I'm guessing that an index on the country field would help, but less so on the airport as it's a straight 'return everything'.
Reply


Messages In This Thread
RE: How to structure the database - MYSQL performance question - by jhob - 10-01-2015, 04:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB