Converting mysql InnoDB tables to MyISAM

Now that I have a VPS with limited memory available for my ‘main server’, I’ve been looking at how to optimize usage to make sure I keep well under the memory limit. I found a nice article Optimizing Apache and MySQL for Low Memory Usage, Part 2 which explains some great ways of reducing your mysql memory usage. One of their best suggestions is to disable InnoDB which can save up to 100M of memory.

I didn’t think I was using InnoDB at all but it turns out that Mediawiki by default sets up some tables using InnoDB even though most are setup as MyISAM. The Mediawiki developers note that InnoDB is better for those tables for high load wikis, but since mine doesn’t exactly qualify as high load, I thought it would be safe to convert.

But how to do it? Some sites recommended dumping the db, changing the ENGINE type for the tables in the dump and then reimport it. I’m sure that works, but it seems like a fairly crude way of going about it. Turns out there’s a better way.

First run the ‘mysql’ commend line program and connect to your database. If you have more than one database on your mysql server, you’ll need to check them each one by one:

mysql
use database;

Then get a list of databases using the InnoDB engine:

show table status where engine="innodb";

For each table change the type as follows:

alter table tablename engine="myisam";

For good measure look at the table types again to make sure you got them all:

show table status where engine="innodb";

If it doesn’t show any, then you can go ahead and put ‘skip-innodb’ in your my.cnf as outlined in the document about optimizing mysql above and you’ll suddenly have an extra 100M of memory available!

Back from Singapore

Actually, I was back on Wednesday night, but was busy with catching up with weekly paperwork and such. The meeting was really nice and I think we got a lot of things accomplished. If even a few things are actually followed through in, there will be a lot of good to come in the next few years. I got to meet a lot of nice people, including the Singapore regional HQ staff which I usually only talk with by email or sometimes by phone. Also plenty of good food and drink as well.

Meeting Day 1

I got to Singapore OK, though I wasn’t much good yesterday evening after having gotten up so early. One of the other meeting participants came in on the same flight but somehow we never bumped into each other. The meeting has been quite interesting. I can’t talk about any of it, but there should be a lot of good things to come out of it. It’s also been a great social opportunity to talk to a lot of Subway people in the Singapore office and from across Asia.

The hotel charges for Internet though, so I’m limiting my use.

Off to Singapore

Got up at 4:40am this morning to catch an early flight to Singapore. Will be there for a two day Subway meeting and then coming back on Wednesday afternoon. Subway has us booked at the Goodwood Hotel (stop snickering, Beavis) which looks like a pretty swank place. This has turned out to be the longest I’ve stayed in Taiwan, with over a year since I got back from the Subway training. Somehow I’ve still managed to keep Gold Card status on EVA Air, so I got the quick check-in and now am waiting in the lounge for the flight to be called.

Jimmy’s Sandwich Coupons

THE BELOW COUPONS VALID ONLY AT JIMMY’S
SANDWICH COMPANY OWNED RESTAURANTS.

Visit http://jimmys.tw/ for locations.

Coupons for Jimmy's Sandwich Company
(Click for larger version.)

From top to bottom:

1) $10 Coffee with any breakfast sandwich 8:00am-11:00am.
(Qingcheng Restaurant Only)

2) Early lunch special: Get free cookie or chips with purchase of bottled drink and any sub or salad before 11:30am.
(Qingcheng and Xingtian Temple Restaurants Only)

3) Buy two 6″ subs, get one 6″ sub free after 5:00pm. (Sub of equal or lesser value is free.)
(Xingtian Temple Restaurant Only)

4) 15% discount on any purchase when raining.
(Qingcheng and Xingtian Temple Restaurants Only)

Copies or printouts of the coupons are accepted!

No Sub Club stamps with discounts. Discounts can not be combined with any other discount or special offer. Valid only at Qingcheng and Xingtian Temple Restaurants through May 31, 2007.

Quick Up-to-dates

So, I passed the written part of the driving test. Still working on the road test parts. Before you laugh at me, go back and review those videos of the test in the last post.

Sunday April 1, we went by High Speed Rail to Tainan for early Tomb Sweeping for my great-grandfather-in-law, grandmother-in-law, and father-in-law. Instead of 5 hours by bus, it was about 1:45 hours on the HSR. I had to give driving directions to Maggie’s father’s grave since she never remembers. I had fried fish soup for lunch (everyone else had other stuff).

In the afternoon we headed to Kending by bus via Gaoxiong. HSR doesn’t go further than Gaoxiong and the bus to Gaoxiong was faster anyways, since the HSR stations are far outside of downtown in both Gaoxiong and Tainan. In Kending we stayed at the Chateau Hotel which was right on the beach. We went a short walk into town for dinner where we sampled night market fare and had some Thai food.

Tuesday we spent all day hanging out on the beach or in the pool.

Wednesday the weather turned cold again but it was still just warm enough in the sun to enjoy the beach a bit more until we had to make our way back home. We took the bus back to Gaoxiong and stopped off at the Liuhe Night Market where I again had my favorite fried fish soup. The Liuhe Night Market place makes it best, even though the Tainan one is supposedly more authentic. Then we took the train up to the HSR station and then back to Taipei on the express train in just 1:40 instead of 6 hours by bus.

Weather has been pretty crappy in Taipei since then. That and the real Tomb Sweeping 4-day holiday of Thursday, April 5 through Sunday April 8 really put a dent in business. Things have been slowly warming up though, so that and some sunny weather should be good for business. Please! Please!

Last night Emily was playing around and dropped a heavy 10 meter metal tape measure square on her big toe and busted the toenail. Lots of blood and drama but she seems to be OK today.

Next week I’m going to Singapore April 15 though April 18 for a Subway meeting. My flight on Sunday leaves 7:40am which means leaving the house at 5:00am. And since the buses aren’t running that early, that also means hiring a taxi to go to the airport. Ugh, too early.

I’m still hoping to make it back to the US at the end of this month. In related news, I’ve finally got the majority of my stuff off of tcp.com and onto my hosting accounts. I just may be able to get the last remnants off by the end of this week.

I also finally got the finalized versions of the VIP discount cards done for my shop, both English and Chinese versions. I found a nice heavy stock green paper that’s a bit lighter than “Subway Green” but pretty nifty looking. Microsoft Word has some decent Business Card Templates that I was able to use for layout, and they even have the ‘A4 sizes’. I got a small laminating machine, business card sized lamination sleeves, a small paper cutter and rounded corner snippers. I tried printing on my laser printer at home, but the toner tends to flake off the rough surface of the heavy stock paper I got. The HP inkjet printer at the restaurant works great though, and once printed, cut, and laminated they look really nifty.

For any of my readers in Taiwan, if you’d like a discount card, email me your mailing address (Chinese preferred) and let me know if you’d like the English or Chinese version and what name you’d like on it.