MySQL Forums
Forum List  »  Performance

Re: Question about the Query Cache and server settings
Posted by: Erin ONeill
Date: July 26, 2005 12:45PM

>4) Using Theta-style instead of ANSI style.
>
>I'll probably get a lot of flak for bringing this up, because a lot of programmers just love their old->style Theta joins (only two of which MySQL even supports the syntax for). I personally feel that >*good* SQL code is *explicit* and *clear* SQL code. Simply put: ANSI style is much, much, much >clearer and more explicit than Theta-style.

YOU HAVE MADE ME A CONVERT! :) Ok, in the past couple of years I've mostly configured and tuned the servers (solaris at that) and only on occasion get to query. These days I'm re-writing a lot of slow queries and trying to pull my SQL out of my brain (long, long time ago in another galaxy I wrote a lot of SQL). And in my configuring and tuning servers I got sloppy in my JOINS. But we're using 2 different versions of MySQL here and they don't always behave consistantly. :)

You can imagine my programmers surprise when I encouraged him to write explicit joins rather than theta style. Suddenly he was getting the results he expected!

I enjoy tweaking queries and writing JOINs these days and I'm not usually into puzzles so I owe it to you Jay for making it fun!

>There are other little style things I go over in the book, but these are the big ones. Consistency is >key. BTW, the book hit stores today I guess. Woo hoo! I'm in the process of putting together a >SQL puzzler on my website; I'm giving free copies away to the folks who write the clearest, most >efficient SQL solutions to the problem questions. I think it will be a fun and interesting way to get >people thinking about style and efficiency in their coding...

So is this your MySQL 5.0 book? Is it just about 5.0? I guess I'll nose around your site and see!

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Question about the Query Cache and server settings
1648
July 26, 2005 12:45PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.