Displaying posts categorized under

MySQL

An example for MySQL query optimization

When I developed an MySQL / PHP web application, I struggled to optimized the database queries to make the application more efficient. One thing we can do is to optimize the SQL queries in the application. Here is one simple example. I have a data table that includes a counter field. Every time user click [...]

  • Share/Bookmark

Database migration: MS Access to MySQL server

The Problem Recently I solved a database migration problem: migrate MS Access database encoded in GB2312 to MySQL server encoded in UTF-8. I’d like to share what I did and hope it is useful to help you solve your problem. I had a lot of useful data in an MS Access database. They were collected [...]

  • Share/Bookmark

A PERL script to get Twitter user information

If you are a Twitter user and do business on Twitter, you probably think about how I can target to a group of Twitter users, such as living in certain region or having similar interests. Can we screen Twitter users and target to a given population of Twitter users? Answer is absolutely positive: yes, we [...]

  • Share/Bookmark

How to split a MySQL dumped file into tables

I maintained a MySQL server and automatically dump everything on the server to a file. The dump process is achieved by a shell script. #!/bin/bash date=`date -I` mysqldump –add-drop-table -u xxxxx -pxxxxx usbargains | gzip > /samba/dat$ mysqldump –add-drop-table –all-databases -u xxxxx -pxxxxx | gzip > /samb$ To be aware that the username and password [...]

  • Share/Bookmark