June 20, 2013

Post: Integers in PHP, running with scissors, and portability

… on 32-bit platforms only! PHP int size is platform-dependent, and it seems to be 8 bytes on our 64-bit boxes. Yes, the very same ones where C/C++ int is 4 bytes, you know. That was the easy part. It was… no native 64-bit integer type in PHP. Let me remind that built-in “int” might be 64-bit, but then again…

Comment: Integers in PHP, running with scissors, and portability

php.net/manual/en/function.pack.php) as they allow you using machine dependent formats: i signed integer (machine dependent size and byte… For example, try on php -r “var_dump(unserialize(‘i:234444444444444344;’));” It will return either int(234444444444444344) or int(-424884552) depending on …

Post: Shard-Query EC2 images available

int(11) DEFAULT NULL, `DepTime` int(11) DEFAULT NULL, `DepDelay` int(11) DEFAULT NULL, `DepDelayMinutes` int(11) DEFAULT NULL, `DepDel15` int(11) DEFAULT NULL, `DepartureDelayGroups` int….34) 56(84) bytes of data. 64 bytes from shard20 (10.126…. to your number of nodes) php genconfig 20 > shards.ini …

Comment: MySQL Partitioning - can save you or kill you

… stick with MyISAM) 1500M. See http://mysql.rjweb.org/doc.php/memory For InnoDB, innodb_buffer_pool_size = 5500M might be… mind the issues raised in http://mysql.rjweb.org/doc.php/myisam2innodb , starting with “Disk space for InnoDB is likely to… because of your “billion” rows. > INT(4) — the 4 says nothing. The INT will be 4 bytes, range of +/-2 billion. Possibly overkill…