MySQL Views and Explain

October 13th, 2013

This week, I ran into a problem when I was profiling that didn’t seem to be very well documented anywhere. I was trying to profile a query that included a view. The error message that I got when I tried to execute my EXPLAIN was: “EXPLAIN/SHOW can not be issued; lacking privileges for underlying table”

After a lot of flailing out, me and the DBA for this project figured out that in order to be able to execute my EXPLAIN, I needed to have SELECT on the key columns that I was using in my query for the table behind the view. Simple enough, but not something made easy to figure out.

Hopefully this helps someone else figure this out faster.

Happy hunting!

If your IDE opens slowly …

September 20th, 2013

… remember that some programs have a list of recently opened files. And that some of those programs try to resolve the path to each of those files. And if the path to some of those files is on a network share, and said network share doesn’t exist sometimes, then your IDE will be very slow. So, clear the recently opened files list.

Fun With Maps Pt1

August 16th, 2013

I’ve been working on getting a mapnik server up and running and tweaked the way I want. Here are some useful things I learned.

Showing logs for renderd
tail -f /var/log/syslog | grep renderd

Restarting the renderd process
/etc/init.d/renderd restart

This is the default maps view file. You need to edit it to change the server address from localhost to (for example) your external IP, so you can view the maps over network.
nano /var/www/osm/slippymap.html

This is where you can find configuration XML files
cd /etc/mapnik-osm-data/

This is the config file that lists the shape files in use

This is where the shape file data is stored

Clear all cached tiles
rm -Rf /var/lib/mod_tile/default

svn Rollback

August 14th, 2013

Every time I need to check out the last revision, I have to Google it. Here is how to check out the rev you want.

svn up -r 1000

Learning Laravel

August 10th, 2013

First impressions, Laravel is interesting. After working with it for a half-dozen hours, I can say that it seems to be simple enough. It’s structured and organized fairly well, and feels like it would work the way I want it to.

That being said, I’m trying to do a simple thing, and am spending too much time digging in the weeds.

Auth::attempt() is supposed to authenticate a user and then store a successful auth in your session.

This does not work.

So now, I’ve turned to my favourite site, StackOverflow:

WordPress - Entries (RSS) and Comments (RSS) - © 2011 Ben Dauphinee