|
Posted by Aggro on September 1, 2006, 2:17 pm
Please log in for more thread options
TWIOF wrote:
> 1) TWO queries one to the gig table retreiving all data, then one to
> the venue table using the venue_id in gigs to find the relevant venue
> id (PK) data.
>
> 2) same as above but using a JOIN
>
> 3) ONE query, but using the venues name as the PK, then i could simply
> disply the name straight out of the gigs table, and then pass this
> allong to the view venues page. I know it's data replication, but are
> fewer queries more eficient?
>
> what do you all think?
3. is propably most efficient, but I recommend using the 2. because 3.
isn't good practice and can cause othe problems. The 2. should be
efficient enough for your needs if you just have proper indexes.
|