Do you have a question? Post it now! No Registration Necessary. Now with pictures!
September 1, 2006, 11:31 am
rate this thread
i have a set of tables reffering to various aspects of a nigh-life
I have tables named gigs and venues. Each gig has a venue.
So when displaying the data on the site people might search for a
specific gig and then see what venue it is heled at and want to see
what other gigs are heled there. Pretty simple.
My problem is. When calling the venue info to the gig page I seem to
have three options and can't decide whch is most efficient (especially
as allot of users may be searching at once).:
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?
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum