ramblings on PHP, SQL, the web, politics, ultimate frisbee and what else is on in my life
Prepared statement gotchas
I spotted an interesting blog post over on Planet OSDB about prepared statements gotchas. It illustrates very well the issue that prepared statements have been plagued with since their inception: namely that they can severely hurt performance (even though they are considered to improve performance by most people).
MySQL enjoying its new home
So it seems that Sun has made it clear that the core product will remain open source. Of course the definition of what is core and what isn't is up to Sun/MySQL to decide, but it seems that overall more things will be released as open source than if MySQL would have gone through with its planned IPO. So this is a good thing. Speaking of non core products, I really like what Mike and his team are doing in the GUI department with the workbench and their other GUI tools. However since Sun is friendly to PostgreSQL and actually also distributes SQLite (its bundled with Solaris after all), I wonder if they are considering making their tools more and more portable across other RDBMS?
Signup for the TestFest@Webtuesday
As I already noted on the Liip blog, there will be a TestFest as part of the Webtuesday Hackday. So in order to better prepare things for the event I would appreciate it if people interested in joining the TestFest drop me a note via email or in a comment. See you there!
Finding the right place for a join condition
In a little app where users can create tabs and portlets in those tabs I ran into some issues with my ordered list implementation. It turns out I just misplaced a filtering expression in the WHERE clause instead of the JOIN condition. The basic idea was that I wanted to add new portlets in the left hand column at the top. The positions from the portlets actually start at 0, but what I am doing is to insert them at 1 below the current minimum or -1 if the table is empty. Then in a second query I push everything up by one. Seemed like the most efficient way to deal with concurrency. I guess in theory I could even skip pushing things up by one, but oh well.
So now that you have posted some clarifications on what is going on exactly, it seems like there is less of a problem as original thought. However I must say that the the replies you posted on Jeremy's blog (and later mine as well), you let me to believe that things are quite bad indeed. Only now that I see your two posts on /, I can relax a bit again. Matthew has written a very good summary of the situation with some historical background.