Re: Optimize Question

2003-08-25 Thread Patrick Crowley
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

Re: Optimize Question

2003-08-25 Thread Patrick Crowley
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

Optimize Question

2003-08-25 Thread Patrick Crowley
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

Re: STUMPED: How Can I Pull Related Info Using Subqueries/Joins?

2003-08-14 Thread Patrick Crowley
> 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

STUMPED: How Can I Pull Related Info Using Subqueries/Joins?

2003-08-14 Thread Patrick Crowley
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...

Re: STUMPED: How Can I Pull Related Info Using Subqueries/Joins?

2003-08-14 Thread Patrick Crowley
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

Re: STUMPED: How Can I Pull Related Info Using Subqueries/Joins?

2003-08-14 Thread Patrick Crowley
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

Re: Spam

2002-01-10 Thread Patrick Crowley
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>>