I'm running 3.23.52 locally, but I just noticed my production server is
running 4.0.12.
Given the complexity of this query, should I use subqueries instead of
joins? Would that make any difference?
Best,
Patrick
> What version of mysql is this? If you're running 3.23, does 4.0.14 do the
> same
I just tried that, but with mixed results.
Like before, when I added an index on publish, I get a 'range' join, but
it's still doing filesort.
> | theater | range | status_publish | 1 | NULL | 4279 | where used; Using
filesort
Any way around that?
Best,
Patrick
> An index on t (publish,photo,n
Hi all!
I'm trying to optimize the statement below, but I can't figure out why this
query is still doing an ALL join with a filesort.
There are several indexes on both my main table ('t'), and all the tables
I'm trying to join. (I also tried adding an index for t.publish, which
bumped my join typ
> Sounds as if your table is not normalized for that kind of query. If
> there are multiple directors id'd by multiple movies you could left
> outer join the movie.id with the director.id
>
> Make sense?
Actually, it's normalized beyond that.
Sometimes, movies have more than one director, so th
I'm creating a tool to browse a database of movie listings. The browser
pulls up 25 results at a time, and you can page through them using 'Next'
and 'Prev' tools. Pretty basic stuff.
Here are my tables:
movies
directors
comments
movies_directors
movies_comments
etc...
Thanks, Jay and Andy! OUTER JOINS work great for part of my query.
But how would you modify this query to support multiple directors? (That's
why I've got a movie_director table.)
Movie Name | Director A, Director B, etc. | 35 comments
Best,
Patrick
> SELECT foo
> FROM movie LEFT OUTER JOI
The comma after Gerlad R was a typo.
As for the 500 actors issue, I'm merely using the movie db as an example.
People always post the strangest db's to this list ("I have one table for
monkeys and one for fishes who speak Urdu, and I need..."), so I thought I'd
spare everyone the particulars of mi
I have to say I'm shocked that the list is completely open. That's such a
stupid newbie thing to do.
Maybe we should initiate a spam strike until the list mom/dad listens. Just
subscribe the list to *another* list, and watch the fun begin...
best,
patrick crowley
mokolabs>>