I reckon that techies sometimes go overboard in accuracy!
Many sites use so-called Great-Circle calculations to find places
within a certain distance of a specified location. The resulting
queries tend to do full table scans with relatively few actual
matches, then order by distance and page or limit that.
If, instead, you use a bounding rectangle and also pretend that
earth is flat, life becomes much easier. The resulting queries
then will use range scans on indexes. So much faster you wouldn't
believe it.
What's the difference? Well, accuracy.
For short distances, the earth's curvature is not
significant.
Apart from that, the maximum deviation from the radius is
(SQRT(POWER(r,2) * 2) - r) where r is the radius, simply applying
Pythagoras' Theorem.
It comes down to a deviation of about 20 kilometers when looking
in …
For those that follow Daylight Savings Time in the US and Canada, watch out this weekend, because we “spring forward”!
The biggest caveat I have is: Do not arrive 1 hour late to work on Sunday or Monday.
As for MySQL, to test if you are fine, run:
SELECT @@global.time_zone;
If you get back “SYSTEM”, then MySQL is looking to the OS for timezone data, which is the default.
The real sanity check:
SELECT UNIX_TIMESTAMP('2007-03-11 02:00:00'),
UNIX_TIMESTAMP('2007-03-11 03:00:00');
This should return the same value, even though you are feeding it different times, because this is when the 1 hr change occurs. If not, and you’ve played with timezone data, remember that timezone data is only loaded when MySQL starts, so if you haven’t restarted MySQL since you patched your OS, you need to do that.
This is mostly stolen from a MySQL list post I found …
[Read more]Do you hate it when you execute a query in the mysql cli only to have the output wrap three times making it almost impossible to read? Do you end up re-executing the query with \G waiting once again for the query to run? Well wait no more! My very first submitted patch to mysql is a client patch that adds –auto-vertical-output. This option compares the width of your terminal to the width of the result set and enables vertical output if it’s going to wrap. The patch link and details are Bug #26780
At last month’s Vancouver PHP Conference, local journalist Bruce Byfield gave me a quick interview about how I got involved in Free Software and Open Source. We chatted for a while about my time at MySQL, my bits of work in the PHP community and what I am currently up to. The interview turned into a profile for Linux.com that was published a few days ago.
I was a bit surprised to find that there have been a few anonymous trolls for the profile - I didn’t think that there would be any comments on the profile.
The Linux.com profile: …
[Read more]XenSource launches global virtualization initiative…O’Reilly joins MySQL AB board of directors…OSBC announces keynote speakers…and more…
XenSource to Kick-off Global Virtualization Initiative, XenSource (Press Release)
Tim O’Reilly to Join MySQL AB’s Board of Directors, MySQL AB (Press Release)
InfoWorld’s Open Source Business Conference Announces Keynote Speakers for May Event, InfoWorld (Press Release)
Mr. Softy Won’t Save Novell, The Motley Fool, Tom Taulli (Article)
…
[Read more]In Windows and Internet web business applications development the connection to the MySQL database server is critical and requires high-level of security. In ADO.NET database technology the connection is defined in the Connection String property of the connection object. Defining and storing the MySQL Connection String properly is an important application setting task for developers today. In this article I'll show you how to setup and secure MySQL Connection String for Windows application development using VB.NET 2005. Also the difference of programming code between VB.NET 2003 and 2005 will be provided for data loading using MySQL Connector/NET 5.0.3 database driver.
MySQL AB today announced the appointment of industry visionary Tim O?Reilly to its corporate board of directors. The company also announced that Dr. Jeffrey Pugh has joined its senior management team as vice president of engineering.
Are you seeing a MySQL error that says InnoDB support isn’t enabled, even though it is? This article explains why it happens and how to fix it. The symptom Suppose you call SHOW INNODB STATUS or another InnoDB-specific command and MySQL reports the following error: “ERROR 1235 (42000): Cannot call SHOW INNODB STATUS because skip-innodb is defined” Yet you search the MySQL configuration files and find that’s not true. And you know you have InnoDB tables, too.
I’m continuing to add new tools to the MySQL Toolkit. MySQL Deadlock Logger is for extracting and storing information about the latest recorded InnoDB deadlock. It’s not only easy to view the information from the command line, it’s dead simple to store it back into a MySQL table for analysis. I think most users will find it handy to create a cron job to record the deadlocks automatically for later analysis.
The topic of database stored procedures does not cease to divide
the community of database application developers and DBAs. There
are many articles around, expressing various opinions about this
subject. But what do you think?
Please let me know and take this survey. The survey contains 5 multiple choice
questions, and will take about 1 to 5 minutes to complete.
The results will be posted soon here on my blog at http://rpbouman.blogspot.com/. Thank you in
advance!
(Disclaimer: I'm an employee of MySQL AB, but this survey does
not in any way relate to my position with my employer. Also, I
have made an utmost effort to write an unbiased survey. If you
feel that something is wrong in this regard, please post a
comment on this post.)