Month: April 2014

Android: Updating View from Background Thread

Issue: android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.   For a small game application that I am currently working on, I needed to change the display text at certain intervals of time. Initially I tried to simply update the view(UI) using a timer class that runs after every […]

Read More

SQL Improving Query Performance

1.     Use Indexes. 2.     Use All instead of UNION, OUTER UNION, EXCEPT and INTERSECT when you know there are no duplicate rows or when you know it does not matter whether duplicate rows are returned. 3.     Omit the ORDER BY clause unless necessary. 4.     Inline VIEWS or Temporary Tables?       If the query […]

Read More