gqlplus – sqlplus with readline (tab completion)

2012-08-03 1 min read Database
Tab completion is something which is missing in the sqlplus and if you have lot of tables with long names or lot of columns then it is sufficiently difficult to type them 🙂 Here is a solution for this problem. Download and install gqlplus. gqlplus is a replcement for sqlplus which supports completion for commands/tablenames and column names. Quite useful. Oracle SQL*Plus (Photo credit: Manuel Cernuda) Related articles 2 GB File limit on writing file using Oracle SQLPlus in Unix(compscicafe. Continue reading

Oracle Select the top 5 queries

2012-02-27 1 min read Database
Here are one sql script that I found some time back. This will be listing the top 5 SQL queries in Oracle. SET linesize 300 SET PAGESIZE 200 select * from (select sql_text, sql_id, elapsed_time, cpu_time, user_io_wait_time from sys.v_$sqlarea order by 5 desc) where rownum < 6; quit; Related articles SQL Fiddle (thinkvitamin.com) New Oracle E-Book (arnoldit.com) All about Security – SQL Injection (tkyte.blogspot.com)

Benchmarking the system/CPU performance

2012-01-15 2 min read bash Fedora Learning
Have you ever wanted to have a quick check on your CPU performance. I know that lot of people will say that this is not the right way to do this, but here is something that you can use to check the CPU speed. #!/bin/bash - #=============================================================================== # # FILE: benchmark.sh # # USAGE: ./benchmark.sh # # DESCRIPTION: Benchmark the CPU # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: Amit Agarwal (aka), amit. Continue reading

analyze debug queries output for wordpress

2011-02-09 2 min read Wordpress
Some time back, my website became too slow and I started getting timeout response for quite a lot of my pages. When I analyzed things, I found the issue was with the DB queries taking a lot of time. So, I thought of getting my hands dirty and started with installing the plugin “Debug Queries”. Just in case, you don’t know about the plugin, it lists all the queries to DB along with the time taken for the query when a Admin user visits any page. Continue reading

Using SQLite to maintain your monthly bills.

2010-08-24 6 min read Linux
I was looking for a small application to maintain my every month bills. The application had to be small and script-able. I basically wanted to keep track of the bills that have been generated and pending payment and the bills that have been paid. First we will create the <a class="zem_slink" title="Database" rel="wikipedia" href="http://en.wikipedia.org/wiki/Database">database schema with the following command: 1 <td> <div class="text codecolorer"> CREATE TABLE bills(name varchar(20), due_dt text, p_dt text, amount integer); </div> </td> </tr> So, I built on the knowledge gathered on <a class="zem_slink" title="SQLite" rel="homepage" href="http://sqlite. Continue reading

SQLite – simple use in scripts

2010-08-21 1 min read Database Linux
Today we will look a the most simple use&#8217;s in the scripts and how to use them. echo &#8221;insert into bills values (&#8221;$name&#8221;,$date_now, $date_now,$1)&#8221;|sqlite bills or the other way to do this is <a class="zem_slink" title="SQLite" rel="homepage" href="http://sqlite.org/">sqlite3 bills &#8221;insert into bills values (&#8221;$name&#8221;,$date_now, $date_now,$1)&#8221; OK, now in the next post we will see a simple application that I am currently developing or planning.<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://tobu. Continue reading

SQLite : Manager for this simple database

2010-08-19 2 min read Database Linux
We will look at sqliteman – <a class="zem_slink" title="SQLite" rel="homepage" href="http://sqlite.org/">SQLite Database manager. If you are looking for a tool for tuning <a class="zem_slink" title="SQL" rel="wikipedia" href="http://en.wikipedia.org/wiki/SQL">SQL statements, manage tables, views, or triggers, administrate the <a class="zem_slink" title="Database" rel="wikipedia" href="http://en.wikipedia.org/wiki/Database">database space and index <a class="zem_slink" title="Statistics" rel="wikipedia" href="http://en.wikipedia.org/wiki/Statistics">statistics then Sqliteman is the perfect choice. If you are looking for a <a class="zem_slink" title="Graphical user interface" rel="wikipedia" href="http://en.wikipedia.org/wiki/Graphical_user_interface">graphical queries creation wizards, <a class="zem_slink" title="User interface" rel="wikipedia" href="http://en. Continue reading
Older posts