Mindblown: a blog about philosophy.
-
MySQL – SHOW commands are expensive
It’s convenient to display information about a table, running status, server configurations. However, it is expensive! A simple “SHOW COLUMNS FROM SomeTable” create a disk-based temporary table!!! The same for “SHOW STATUS LIKE ‘Created_%’”. Lesson: avoid these if you don’t want to see “Created_tmp_disk_tables” and “Created_tmp_tables” counters spinning. It’s not a bug but can mislead…
-
Issue with MySQL replication
For some reasons I have not been able to pin point exactly which piece goes wrong, if a master has too many slaves, it will have quite a few issues. 1) lighttpd regularly get backend overloaded errors; 2) ping to this server will fluctuate drastically. And I don’t think it’s that many slaves.
-
Windows Vista Firewall
If I didn’t know, I would say it sucks and install another firewall, like ZoneAlarm for all my other XP computers. However, after an issue with delay and slow connection to localhost, I have identified the problem is with conflicting firewalls. Uninstalled ZoneAlarm, then tweak Vista Firewall, it’s quite powerful (use w/ Advanced Security option).…
-
SHOW TABLE STATUS FROM MyDatabaseName;
Run that query if you would like to know basic details about a database, especially the overhead to see if you would need to optimize it. Name: AdSpeedDB Engine: MyISAM Version: 10 Row_format: Dynamic Rows: 0 Avg_row_length: 0 Data_length: 4676 Max_data_length: 281474976710655 Index_length: 3072 Data_free: 4676 Auto_increment: 221 Create_time: 2007-08-01 17:15:24 Update_time: 2008-06-03 07:26:13 Check_time:…
-
MySQL database of geographical countries
CREATE TABLE `geo_country` ( `CountryId` int(10) unsigned NOT NULL default ‘0’, `Country` varchar(100) NOT NULL default ”, `FIPS104` char(2) NOT NULL default ”, `ISO2` char(2) NOT NULL default ”, `ISO3` char(3) NOT NULL default ”, `ISON` int(10) unsigned NOT NULL default ‘0’, `Internet` char(2) NOT NULL default ”, `Capital` varchar(100) NOT NULL default ”, `MapReference`…
-
MySQL database for geographical regions
CREATE TABLE `geo_region` ( `RegionId` int(10) unsigned NOT NULL default ‘0’, `CountryId` int(10) unsigned NOT NULL default ‘0’, `Region` varchar(100) NOT NULL default ”, `Code` char(2) NOT NULL default ”, `ADM1Code` varchar(4) NOT NULL default ”, PRIMARY KEY (`RegionId`), KEY `CountryId` (`CountryId`), KEY `Region` (`Region`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=’Regions from GeoBytes’; — — Dumping…
-
Geographical city MySQL database
CREATE TABLE `geo_city` ( `CityId` int(10) unsigned NOT NULL default ‘0’, `CountryId` int(10) unsigned NOT NULL default ‘0’, `RegionId` int(10) unsigned NOT NULL default ‘0’, `City` varchar(100) NOT NULL default ”, `Latitude` float NOT NULL default ‘0’, `Longitude` float NOT NULL default ‘0’, `TimeZone` varchar(6) NOT NULL default ”, `DmaId` int(10) unsigned NOT NULL default…
-
MySQL replication problem with 5.0.46-48
For CentOS 4.x, if you want MySQL 5.0.x then you would probably use CentOS Plus. And the current MySQL distribution goes with it is often 5.0.46 or 5.0.48, they both have a problem when acting as a slave replication. At every reboot, the replication breaks because the relay log and some other important files is…
-
Updating fields in Microsoft Word
To update a cross-reference field, click it and press F9. If you want to update all of the fields in your document, press Ctrl+A to select the entire document before pressing F9.
-
Understand a person from his/her blog comments
What if there exists a system that goes out to all blogs, reads the comments, aggregates them into individual profiles. Each comment often has the name and website. A person shares her opinion at this blog, another one at another blog. Soon enough, you will be able to understand her thoughts. It’s a behavioral data…
Got any book recommendations?