<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><description>phildawson.co.uk</description><title>phil has a blog</title><generator>Tumblr (3.0; @phildawson)</generator><link>https://phildawson.tumblr.com/</link><item><title>ogr2ogr: error while loading shared libraries: libgdal.so.1</title><description>&lt;p&gt;ogr2ogr: error while loading shared libraries: libgdal.so.1: cannot open shared object file: No such file or directory&lt;/p&gt;

&lt;p&gt;Just run&lt;br/&gt;
sudo ldconfig&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/84223940700</link><guid>https://phildawson.tumblr.com/post/84223940700</guid><pubDate>Tue, 29 Apr 2014 15:03:48 +0100</pubDate></item><item><title>osx - Can't install Brew formulae correctly (Permission denied in /usr/local/lib) - Super User</title><description>&lt;a href="http://superuser.com/questions/254843/cant-install-brew-formulae-correctly-permission-denied-in-usr-local-lib"&gt;osx - Can't install Brew formulae correctly (Permission denied in /usr/local/lib) - Super User&lt;/a&gt;: &lt;p&gt;sudo chown -R `whoami` /usr/local&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/82095479662</link><guid>https://phildawson.tumblr.com/post/82095479662</guid><pubDate>Tue, 08 Apr 2014 15:42:07 +0100</pubDate></item><item><title>mysql LOAD DATA INFILE speed config tests</title><description>&lt;p&gt;Desktop tests&lt;br/&gt;
2.8 GHz Intel Core 2 Duo&lt;br/&gt;
4GB 667 MHz DDR2 SDRAM&lt;br/&gt;
Fresh 5.6.16 MySQL Community Server install - no configs made&lt;br/&gt;
&amp;ndash;&lt;/p&gt;

&lt;p&gt;Test set:&lt;br/&gt;
&lt;a href="http://datagov.ic.nhs.uk/presentation/2013_11_November/T201311PDPI+BNFT.CSV"&gt;http://datagov.ic.nhs.uk/presentation/2013_11_November/T201311PDPI+BNFT.CSV&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Test 1 - LOAD DATA INFILE vs LOAD DATA LOCAL INFILE&lt;/p&gt;

&lt;p&gt;mysql&amp;gt; LOAD DATA INFILE &amp;lsquo;T201311PDPI+BNFT.csv&amp;rsquo; INTO TABLE pres FIELDS TERMINATED BY &amp;rsquo;,&amp;rsquo; ENCLOSED BY &amp;rsquo;&amp;ldquo;&amp;rsquo; LINES TERMINATED BY &amp;rsquo;\n&amp;rsquo; IGNORE 1 LINES (SHA,PCT,PRACTICE,BNF_CODE,BNF_NAME,ITEMS,NIC,ACT_COST,QUANTITY,PERIOD,@dummy);&lt;br/&gt;
Query OK, 10053266 rows affected (2 min 49.10 sec)&lt;/p&gt;

&lt;p&gt;mysql&amp;gt; LOAD DATA LOCAL INFILE &amp;rsquo;~/Desktop/T201311PDPI+BNFT.csv&amp;rsquo; INTO TABLE pres FIELDS TERMINATED BY &amp;rsquo;,&amp;rsquo; ENCLOSED BY &amp;rsquo;&amp;rdquo;&amp;rsquo; LINES TERMINATED BY &amp;rsquo;\n&amp;rsquo; IGNORE 1 LINES (SHA,PCT,PRACTICE,BNF_CODE,BNF_NAME,ITEMS,NIC,ACT_COST,QUANTITY,PERIOD,@dummy);&lt;br/&gt;
Query OK, 10053266 rows affected (3 min 35.55 sec)&lt;/p&gt;

&lt;p&gt;conclusion: LOAD DATA INFILE significantly faster.&lt;/p&gt;

&lt;p&gt;Test 2 - compact vs compressed with LOAD DATA INFILE&lt;br/&gt;
head -n 1000001 T201311PDPI+BNFT.CSV &amp;gt; 1m.csv&lt;br/&gt;
my.cnf&lt;br/&gt;
innodb_file_format=Barracuda&lt;br/&gt;
innodb_file_per_table=1&lt;/p&gt;

&lt;p&gt;Query OK, 1000000 rows affected (14.67 sec)&lt;br/&gt;
=&lt;br/&gt;
125.7 MiB compact&lt;/p&gt;

&lt;p&gt;Query OK, 1000000 rows affected (23.37 sec)&lt;br/&gt;
=&lt;br/&gt;
53.8 MiB compressed, key_block_size = 8&lt;/p&gt;

&lt;p&gt;Query OK, 1000000 rows affected (52.45 sec)&lt;br/&gt;
=&lt;br/&gt;
47 MiB compressed, key_block_size = 4&lt;/p&gt;

&lt;p&gt;conclusion:  8K compression saves a lot of space and only takes slightly longer to import&lt;br/&gt;
ALTER TABLE pres ROW_FORMAT=COMPRESSED, KEY_BLOCK_SIZE=8;&lt;/p&gt;

&lt;p&gt;&lt;br/&gt;
Test 3 - Messing with recommended config settings with LOAD DATA INFILE&lt;/p&gt;

&lt;p&gt;No config changes from default&lt;br/&gt;
mysql&amp;gt; LOAD DATA INFILE 'T201311PDPI+BNFT.csv&amp;rsquo; INTO TABLE pres FIELDS TERMINATED BY &amp;rsquo;,&amp;rsquo; ENCLOSED BY &amp;rsquo;&amp;ldquo;&amp;rsquo; LINES TERMINATED BY &amp;rsquo;\n&amp;rsquo; IGNORE 1 LINES (SHA,PCT,PRACTICE,BNF_CODE,BNF_NAME,ITEMS,NIC,ACT_COST,QUANTITY,PERIOD,@dummy);&lt;br/&gt;
Query OK, 10053266 rows affected (2 min 49.10 sec)&lt;/p&gt;

&lt;p&gt;Each tested independently.&lt;/p&gt;

&lt;p&gt;SET FOREIGN_KEY_CHECKS=0;&lt;br/&gt;
Query OK, 10053266 rows affected (2 min 44.19 sec)&lt;/p&gt;

&lt;p&gt;SET UNIQUE_CHECKS=0;&lt;br/&gt;
Query OK, 10053266 rows affected (2 min 45.89 sec)&lt;/p&gt;

&lt;p&gt;innodb_autoinc_lock_mode       = 2 // my.cnf&lt;br/&gt;
Query OK, 10053266 rows affected (2 min 49.38 sec)&lt;/p&gt;

&lt;p&gt;SET SESSION tx_isolation='READ-UNCOMMITTED&amp;rsquo;&lt;br/&gt;
Query OK, 10053266 rows affected (2 min 47.76 sec)&lt;/p&gt;

&lt;p&gt;both&lt;br/&gt;
SET FOREIGN_KEY_CHECKS=0;&lt;br/&gt;
SET UNIQUE_CHECKS=0;&lt;br/&gt;
Query OK, 10053266 rows affected (2 min 50.38 sec) WTF&lt;/p&gt;

&lt;p&gt;SET SQL_LOG_BIN=1; // testing on as other tests ran with default off&lt;br/&gt;
Query OK, 10053266 rows affected (4 min 26.61 sec)&lt;/p&gt;

&lt;p&gt;conclusion: very minimal gain from altering them on 10m rows other than the obvious log_bin should be off, testing needed with larger sets 500m+ and powerful servers.&lt;/p&gt;

&lt;p&gt;&amp;ndash;&lt;br/&gt;
CREATE TABLE IF NOT EXISTS `pres` (&lt;br/&gt;
  `id` int(11) NOT NULL AUTO_INCREMENT,&lt;br/&gt;
  `SHA` varchar(3) DEFAULT NULL,&lt;br/&gt;
  `PCT` varchar(3) DEFAULT NULL,&lt;br/&gt;
  `PRACTICE` varchar(6) DEFAULT NULL,&lt;br/&gt;
  `BNF_CODE` varchar(15) DEFAULT NULL,&lt;br/&gt;
  `BNF_NAME` varchar(40) DEFAULT NULL,&lt;br/&gt;
  `ITEMS` int(7) DEFAULT NULL,&lt;br/&gt;
  `NIC` decimal(10,2) DEFAULT NULL,&lt;br/&gt;
  `ACT_COST` decimal(10,2) DEFAULT NULL,&lt;br/&gt;
  `QUANTITY` int(7) DEFAULT NULL,&lt;br/&gt;
  `PERIOD` varchar(24) DEFAULT NULL,&lt;br/&gt;
  PRIMARY KEY (`id`)&lt;br/&gt;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/80720878032</link><guid>https://phildawson.tumblr.com/post/80720878032</guid><pubDate>Tue, 25 Mar 2014 23:08:00 +0000</pubDate></item><item><title>shell - How to display current path in command prompt in linux's sh (not bash)? - Super User</title><description>&lt;a href="http://superuser.com/questions/601181/how-to-display-current-path-in-command-prompt-in-linuxs-sh-not-bash"&gt;shell - How to display current path in command prompt in linux's sh (not bash)? - Super User&lt;/a&gt;: &lt;p&gt;sh-4.2$ export PS1=“\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$”&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/78551221511</link><guid>https://phildawson.tumblr.com/post/78551221511</guid><pubDate>Tue, 04 Mar 2014 15:43:38 +0000</pubDate></item><item><title>shell - How to display current path in command prompt in linux's sh (not bash)? - Super User</title><description>&lt;a href="http://superuser.com/questions/601181/how-to-display-current-path-in-command-prompt-in-linuxs-sh-not-bash"&gt;shell - How to display current path in command prompt in linux's sh (not bash)? - Super User&lt;/a&gt;: &lt;p&gt;&lt;a href="http://superuser.com/questions/601181/how-to-display-current-path-in-command-prompt-in-linuxs-sh-not-bash"&gt;http://superuser.com/questions/601181/how-to-display-current-path-in-command-prompt-in-linuxs-sh-not-bash&lt;/a&gt;&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/78551193160</link><guid>https://phildawson.tumblr.com/post/78551193160</guid><pubDate>Tue, 04 Mar 2014 15:43:12 +0000</pubDate></item><item><title>Fiddle</title><description>&lt;a href="http://imulus.com/fiddle/"&gt;Fiddle&lt;/a&gt;</description><link>https://phildawson.tumblr.com/post/77945182085</link><guid>https://phildawson.tumblr.com/post/77945182085</guid><pubDate>Wed, 26 Feb 2014 22:38:16 +0000</pubDate></item><item><title>http://www.muleradio.net/thebigwebshow/</title><description>&lt;a href="http://www.muleradio.net/thebigwebshow/"&gt;http://www.muleradio.net/thebigwebshow/&lt;/a&gt;</description><link>https://phildawson.tumblr.com/post/77943955809</link><guid>https://phildawson.tumblr.com/post/77943955809</guid><pubDate>Wed, 26 Feb 2014 22:25:51 +0000</pubDate></item><item><title>Changing File Permissions « WordPress Codex</title><description>&lt;a href="http://codex.wordpress.org/Changing_File_Permissions"&gt;Changing File Permissions « WordPress Codex&lt;/a&gt;</description><link>https://phildawson.tumblr.com/post/77940026801</link><guid>https://phildawson.tumblr.com/post/77940026801</guid><pubDate>Wed, 26 Feb 2014 21:46:00 +0000</pubDate></item><item><title>php imap ubuntu - not working solution</title><description>&lt;p&gt;ln -s /etc/php5/conf.d/imap.ini /etc/php5/mods-available/imap.ini&lt;br/&gt;
php5enmod imap&lt;br/&gt;
service apache2 restart&lt;/p&gt;

&lt;p&gt;Source&lt;br/&gt;
&lt;a href="http://askubuntu.com/questions/362082/php-is-not-working-well-on-ubuntu-13-10-and-mcrypt-is-missing-in-phpmyadmin"&gt;http://askubuntu.com/questions/362082/php-is-not-working-well-on-ubuntu-13-10-and-mcrypt-is-missing-in-phpmyadmin&lt;/a&gt;&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/76623076548</link><guid>https://phildawson.tumblr.com/post/76623076548</guid><pubDate>Fri, 14 Feb 2014 11:54:48 +0000</pubDate></item><item><title>Bootswatch: Journal</title><description>&lt;a href="http://bootswatch.com/journal/"&gt;Bootswatch: Journal&lt;/a&gt;</description><link>https://phildawson.tumblr.com/post/76352965279</link><guid>https://phildawson.tumblr.com/post/76352965279</guid><pubDate>Tue, 11 Feb 2014 20:52:25 +0000</pubDate></item><item><title>Schedule Tasks on Linux Using Crontab | kvz.io</title><description>&lt;a href="http://kvz.io/blog/2007/07/29/schedule-tasks-on-linux-using-crontab/"&gt;Schedule Tasks on Linux Using Crontab | kvz.io&lt;/a&gt;: &lt;blockquote class="link_og_blockquote"&gt;Kevin van Zonneveld on writing apps and their ecosystems.&lt;/blockquote&gt;</description><link>https://phildawson.tumblr.com/post/75897522106</link><guid>https://phildawson.tumblr.com/post/75897522106</guid><pubDate>Fri, 07 Feb 2014 14:24:25 +0000</pubDate></item><item><title>mysql  reads rows from a text file into a table at a very high speed</title><description>&lt;p&gt;LOAD DATA INFILE &amp;lsquo;file.csv&amp;rsquo; INTO TABLE xxxx FIELDS TERMINATED BY &amp;rsquo;,&amp;rsquo; ENCLOSED BY &amp;rsquo;&amp;ldquo;&amp;rsquo; LINES TERMINATED BY &amp;rsquo;\n&amp;rsquo; IGNORE 1 LINES (col1,col2,col3);&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/75589674011</link><guid>https://phildawson.tumblr.com/post/75589674011</guid><pubDate>Tue, 04 Feb 2014 14:57:44 +0000</pubDate></item><item><title>Fixing no sound through headphones on 27" iMac with Ubuntu</title><description>&lt;p&gt;sudo gedit /etc/modprobe.d/alsa-base.conf&lt;/p&gt;

&lt;p&gt;add &lt;br/&gt;
options snd-hda-intel model=imac27_122&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/75589602363</link><guid>https://phildawson.tumblr.com/post/75589602363</guid><pubDate>Tue, 04 Feb 2014 14:56:28 +0000</pubDate></item><item><title>ubuntu mighty mouse scroll speed</title><description>&lt;p&gt;sudo rmmod hid_magicmouse&lt;br/&gt;
sudo modprobe hid_magicmouse scroll-speed=55 scroll-acceleration=5&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/70181330794</link><guid>https://phildawson.tumblr.com/post/70181330794</guid><pubDate>Mon, 16 Dec 2013 11:00:48 +0000</pubDate></item><item><title>Lion like scrolling on Ubuntu – Inverse scrolling on Linux | Andy Barratt - Professional Geek</title><description>&lt;a href="http://www.andybarratt.co.uk/lion-like-scrolling-on-ubuntu-inverse-scrolling-on-linux"&gt;Lion like scrolling on Ubuntu – Inverse scrolling on Linux | Andy Barratt - Professional Geek&lt;/a&gt;: &lt;blockquote class="link_og_blockquote"&gt;[caption id=attachment_606 align=alignright width=175 caption=Lion, the latest operating sytem for mac from Apple.][/caption] Any one who has&lt;/blockquote&gt;</description><link>https://phildawson.tumblr.com/post/70181313348</link><guid>https://phildawson.tumblr.com/post/70181313348</guid><pubDate>Mon, 16 Dec 2013 11:00:20 +0000</pubDate></item><item><title>bluetooth - Apple Magic Mouse and ubuntu</title><description>&lt;a href="http://askubuntu.com/questions/267952/apple-magic-mouse-successfully-connected-but-doesnt-work"&gt;bluetooth - Apple Magic Mouse and ubuntu&lt;/a&gt;: &lt;p&gt;sudo apt-get install blueman&lt;/p&gt;

&lt;p&gt;sudo reboot&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/69584671325</link><guid>https://phildawson.tumblr.com/post/69584671325</guid><pubDate>Tue, 10 Dec 2013 13:14:39 +0000</pubDate></item><item><title>gnome3 snippets</title><description>&lt;p&gt;sudo apt-get install gnome-shell ubuntu-gnome-desktop&lt;br/&gt;
sudo apt-get install gnome-tweak-tool&lt;/p&gt;

&lt;p&gt;&lt;a href="http://itsfoss.com/things-to-do-after-installing-ubuntu-13-10/"&gt;http://itsfoss.com/things-to-do-after-installing-ubuntu-13-10/&lt;/a&gt;&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/69162285441</link><guid>https://phildawson.tumblr.com/post/69162285441</guid><pubDate>Fri, 06 Dec 2013 11:27:00 +0000</pubDate></item><item><title>Create a Windows 8 USB Installer on 10.9 Using BootCamp (Also Windows 7)</title><description>&lt;a href="http://www.youtube.com/watch?v=WQE2vbpYwRs"&gt;Create a Windows 8 USB Installer on 10.9 Using BootCamp (Also Windows 7)&lt;/a&gt;: &lt;blockquote class="link_og_blockquote"&gt;In terminal, run the following command without the quotes: “sudo codesign -fs - /Applications/Utilities/Boot\ Camp\ Assistant.app” I did not mention it in th…&lt;/blockquote&gt;</description><link>https://phildawson.tumblr.com/post/68085018082</link><guid>https://phildawson.tumblr.com/post/68085018082</guid><pubDate>Mon, 25 Nov 2013 19:42:53 +0000</pubDate></item><item><title>[ubuntu] How to fix the "/var/log/jockey.log" wifi driver problem</title><description>&lt;a href="http://ubuntuforums.org/showthread.php?t=1606745"&gt;[ubuntu] How to fix the "/var/log/jockey.log" wifi driver problem&lt;/a&gt;: &lt;p&gt;install&lt;/p&gt;

&lt;p&gt;broadcom-sta-common&lt;br/&gt;
broadcom-sta-source&lt;br/&gt;
bcmwl-kernel-source&lt;br/&gt;
 &lt;br/&gt;
and reboot&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/68051793327</link><guid>https://phildawson.tumblr.com/post/68051793327</guid><pubDate>Mon, 25 Nov 2013 09:55:01 +0000</pubDate></item><item><title>rename files in directory to lowercase linux</title><description>&lt;p&gt;rename &amp;lsquo;y/A-Z/a-z/&amp;rsquo; *&lt;/p&gt;</description><link>https://phildawson.tumblr.com/post/67648197277</link><guid>https://phildawson.tumblr.com/post/67648197277</guid><pubDate>Thu, 21 Nov 2013 10:04:37 +0000</pubDate></item></channel></rss>
