Tuesday, July 8, 2014

How to enable user switching on android 4.2.x if you have no such option in settings menu.

Several  simple  steps required.

1) root your device.
2)install terminal  emulator
3)run these commands

su
mount -o rw,remount /system

echo "fw.max_users=5" >> /system/build.prop
reboot
4) go  to  settings/user  and configure another user.

That is it .

android user switch
android change user
android no user switch  feature
android no user settings
android multiple users

Tuesday, April 29, 2014

mySQL optimization. Index not used. Why?

Recently  i  have found that index is never  used  for searching  in a slow mySQL query,  despite the fact  that  it would be very usefull.  FORCE INDEX did nothing.   The  explain command  still shows ALL.

After  digging  the web i have finally got what  is happening.
While the  field  was VARCHAR  the value in  the  query was integer.
where field_name =123

So  after  quoting  the  value like this [where field_name ="123"]  the  query  runs instantly. 0.001 s on a million of rows.

Epic win .