Friday, November 26, 2010
Web Server Issues
MySql General Info
2. another process reads from relay log and executes them
Tuesday, November 23, 2010
Intellij Idea : Using framework as a RSL(Remote shared library) in a Flex project
Monday, November 22, 2010
Installing and running hadoop on windows xp in standalone mode
1. Download hadoop from http://hadoop.apache.org/common/releases.html#Download
9. export HADOOP_CLASSPATH=build/classes
Thursday, November 18, 2010
Shell: showing lines which are present only in one file
comm -13 <(sort a.txt) <(sort b.txt)
will show only the lines which are present in b.txt
Monday, November 15, 2010
Vim regexp example
Shell scripts on Cygwin, xargs in general
(i) find out whether the command being used with xargs expects single operand or multiple operands, for e.g.
Friday, November 12, 2010
aspell
Built-in shell variables
Shell: setting unsetting functions
Thursday, November 11, 2010
The Pragmatic Programmer : tips
The Pragmatic Programmer : tips
4. Don't be a slave to formal methods
Shell: showing lines which are present only in one file
will show only the lines which are present in b.txt
Wednesday, November 10, 2010
Mysql : percentile of queries completed in a specific duration, on weekly basis
A MySql table with 2 columns : load_start_time,load_end_time, both the
columns contain unix timestamps.
What I need :
Weekwise data in the following format :
Week Time_taken_for_load_to_complete percentile_of_loads_completed_in_that_time
Here are the requisite queries :
drop table if exists tbl;
create table tbl as ( select
week(date(from_unixtime(load_start_time))) as w,round((load_end_time -
load_start_time)/10) as 10SecInterval,count(1) as numReqs from
user_load_data where load_start_time is not null and load_end_time is
not null group by w,10SecInterval having(10SecInterval < 240 and
10SecInterval >= 0));
--compute percentile
drop table if exists tbl1;
create table tbl1 as ( select a.w,a.10SecInterval*10 as
seconds,round(100*((select sum(numReqs) from tbl as b where b.w = a.w
and b.10SecInterval <= a.10SecInterval)/(select sum(numReqs) from tbl
as c where c.w = a.w))) as percentile from tbl as a);
select * from tbl1 limit 200;
Blog Archive
-
▼
2010
(147)
-
▼
November
(16)
- Web Server Issues
- MySql General Info
- Intellij Idea : Using framework as a RSL(Remote sh...
- Installing and running hadoop on windows xp in sta...
- Shell: showing lines which are present only in one...
- Vim regexp example
- Shell scripts on Cygwin, xargs in general
- aspell
- Built-in shell variables
- Shell : getopts
- Shell: exit status of last command
- Shell: setting unsetting functions
- The Pragmatic Programmer : tips
- The Pragmatic Programmer : tips
- Shell: showing lines which are present only in one...
- Mysql : percentile of queries completed in a speci...
-
▼
November
(16)