Sometimes we want to improve the state of the things but ends up in a vain attempt. There are lot of factors that contributes to this. Not much of help from peers, micro-mgmt from top-level, lack of self-motivation, lack of will to take the ownership/leadership are things which I feel are the key factors that determine the performance of an employee.
Of course things should also be communicated in a better manner!! And guys should be motivated every now and then!! I always wonder if I ever learn the definition of "motivation" :( But what's motivation!! Is it pushing people to get the chores done!! Or is it trying to extract "more" from someone!! What's "more"? How much is that? If we can't even get the basic things done, can we even/ever get to the extent of extracting "more". I doubt!! But why should we even "motivate"? If someone is paid for and expected to do certain things by following certain well-established practices, do we additionally need to "push" them also? If the answer is "yes", I hate being a manager.
For me "motivation" means a positive way of influencing peers by setting some high standards!! Actions but not the words should speak.!!
Stopping here as I get irritated more and more to work when I think of these things!!
Sigh!!!
Sujay
Thursday, November 20, 2008
Thursday, November 6, 2008
What the heck is going on in life!!!
I don't know why exactly but I am feeling different today..definitely different but don't know exactly what..disturbed by something..definitely not a bad feeling though.. :) went up for a chai to think "that"!! i got it....not doing anything really constructive in life!!.. this thought is killing me since the last few years and increasingly turning out to be a huge menace for the survival of my psyche. can't take it anymore..i am going to do something.. get a pen and paper....lemme give it a try again today ... hope to add some good news by tomorrow..!!
My favorite leader
Leaders are born, not made. I believe in this and right from the day Obama had started his campaign I found a "leader" in him. He may not be having all the experience in the world like the McCain's or the Bush's but he is pretty clear on what he is going to do and what is expected out of him. He is more than a person with ambitions. He is a "force" and I just can't stop the rush of adrenaline when listening to his speeches. Especially when he delivers his trademark phrases "we are going to do it", "change is going to come", the adrenaline just rushes to the peak.
The election day was finally there. I woke up an hour early than my regular schedule with the anxiety of catching up with the election results. I opened cnn.com and to all my delight the top story reads out "Obama is gaining momentum across all the states". Minutes later Dems took a clear lead of Ohio, the battleground state and a traditional strong hold of the Reps. As the time pass by, more and more states are taken by the Dems and all that Mc Cain could do is to "concede". It's official and Obama is the new American President. Three cheers to the "leader"!!!
The first phase and probably the easiest phase is over and he has done with ease by keeping his cool all the way. But the road ahead for him may not be any smooth. He is probably getting into the hot seat in the toughest of times. Nothing is going well for the Americans. I believe that he has all the capabilities to take care of these serious problems and wish him all the best in his tenure at white House!!
The election day was finally there. I woke up an hour early than my regular schedule with the anxiety of catching up with the election results. I opened cnn.com and to all my delight the top story reads out "Obama is gaining momentum across all the states". Minutes later Dems took a clear lead of Ohio, the battleground state and a traditional strong hold of the Reps. As the time pass by, more and more states are taken by the Dems and all that Mc Cain could do is to "concede". It's official and Obama is the new American President. Three cheers to the "leader"!!!
The first phase and probably the easiest phase is over and he has done with ease by keeping his cool all the way. But the road ahead for him may not be any smooth. He is probably getting into the hot seat in the toughest of times. Nothing is going well for the Americans. I believe that he has all the capabilities to take care of these serious problems and wish him all the best in his tenure at white House!!
Monday, November 3, 2008
Try to blog regularly!!
I don't know how I am away from blogging for such a long time. Might be I was preparing for my GMAT for so long that I was not able to do anything else. Neither did I prepare well and of course the final score reflected that very well :)
But now I should be free and will update my blog regularly!!
But now I should be free and will update my blog regularly!!
Multiple columns having default TIMESTAMP
Based on the last two statements in the above section, we can get a workaround for this (date_modified, date_modified) combination problem, where both the columns should default to sysdate.
Follow the below example.
mysql> create table multicolsdefaultts (name varchar(100),date_modified timestamp,date_added timestamp);
Query OK, 0 rows affected (0.03 sec)
mysql> show create table multicolsdefaultts;
CREATE TABLE `multicolsdefaultts` (
`name ` varchar(100) NULL,
`date_modified` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
`date_added` timestamp NOT NULL default '0000-00-00 00:00:00'
)
mysql> insert into multicolsdefaultts values ('sujay', null,null);
Query OK, 1 row affected (0.00 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from multicolsdefaultts;
+-------+---------------------+---------------------+
| name | date_modified | date_added |
+-------+---------------------+---------------------+
| sujay | 2007-01-09 23:52:31 | 2007-01-09 23:52:31 |
+-------+---------------------+---------------------+
1 row in set (0.00 sec)
mysql> update multicolsdefaultts set name='sujay1';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from multicolsdefaultts;
+--------+---------------------+---------------------+
| name | date_modified | date_added |
+--------+---------------------+---------------------+
| sujay1 | 2007-01-09 23:52:44 | 2007-01-09 23:52:31 |
+--------+---------------------+---------------------+
1 row in set (0.00 sec)
mysql> insert into multicolsdefaultts(name) values ('Andale');
Query OK, 1 row affected (0.00 sec)
mysql> select * from multicolsdefaultts;
+--------+---------------------+---------------------+
| name | date_modified | date_added |
+--------+---------------------+---------------------+
| sujay | 2007-01-09 23:52:31 | 2007-01-09 23:52:31 |
| Andale | 2007-01-30 17:02:01 | 0000-00-00 00:00:00 |
+--------+---------------------+---------------------+
mysql> insert into multicolsdefaultts(name, date_added) values ('Andale2', null);
Query OK, 1 row affected (0.00 sec)
mysql> select * from multicolsdefaultts;
+---------+---------------------+---------------------+
| name | date_modified | date_added |
+---------+---------------------+---------------------+
| sujay | 2007-01-09 23:52:31 | 2007-01-09 23:52:31 |
| Andale | 2007-01-30 17:02:01 | 0000-00-00 00:00:00 |
| Andale2 | 2007-01-30 17:12:01 | 2007-01-30 17:12:01 |
+---------+---------------------+---------------------+
The important things to remember here are
- MySQL gives warnings or errors if you try to insert an illegal date. But by using the ALLOW_INVALID_DATES SQL mode, we can still store illegal dates.
-
CREATE TABLE t (ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
. This allows to update the column to currenttime during row creation as well as updation.
Sunday, October 21, 2007
Farewell to my beloved Manager ..
This is one of the sad days (I must have used the superlative here if would have taken into account only the official things) for me after joining Andale (Now vendio). Karthik, the Director of Engg, the guy, "the one" who knows managing people is moving out of Vendio :(
If I remember correctly, it was some time in November 2005, I moved under Karthik from Ravi/Ardaman after completing the Counters MySQL Migration beast. The first project i had worked under him is "Moving the eBay API to the new schema" which went out really good and then started our journey, a journey filled with all the positive adjectives like happiness, joy, love, respect and so on. From there onwards, there is no looking back.
He always tries to find out the interests of us, extends his complete support for them and make sure they gets fulfilled. Back in mid 2006, after working alone on the counters product for almost close to 1.5 years, I expressed my intent to come out of that hell, loneliness. And within no time, I was given a non-Counters project, I started working on a Java project. He is kind enough to give me some time in learning Java also. There are lot of other instances where he proved himself to be "the leader".
Believe it or not, all this has happened through Phone and email. He is in US office and we used to work from Bangalore. (sounds unrealistic...cant do anything..it happened). Luckily, once i got an opportunity to work with him directly for around 4 months. That was an amazing experience, an experience of a life time. The best part in Karthik, he treats you so well, you will never end up with a feeling of hesitation to express something. And he really understands things and try to provide all the help that he can. The other thing that I really like in Karthik is the freedom that he gives you to do things. He always encourages new ideas and always game for experimentation (My guy).
I am just speechless when I heard the word "leaving" from him. I am just shocked/surprised. Cant do much now. He is decided and he is moving. He is the best manager i have worked with., of course, one anyone can work with; i can only say ATB to him for all his future endeavors and I wish i would work with him some time soon.
If I remember correctly, it was some time in November 2005, I moved under Karthik from Ravi/Ardaman after completing the Counters MySQL Migration beast. The first project i had worked under him is "Moving the eBay API to the new schema" which went out really good and then started our journey, a journey filled with all the positive adjectives like happiness, joy, love, respect and so on. From there onwards, there is no looking back.
He always tries to find out the interests of us, extends his complete support for them and make sure they gets fulfilled. Back in mid 2006, after working alone on the counters product for almost close to 1.5 years, I expressed my intent to come out of that hell, loneliness. And within no time, I was given a non-Counters project, I started working on a Java project. He is kind enough to give me some time in learning Java also. There are lot of other instances where he proved himself to be "the leader".
Believe it or not, all this has happened through Phone and email. He is in US office and we used to work from Bangalore. (sounds unrealistic...cant do anything..it happened). Luckily, once i got an opportunity to work with him directly for around 4 months. That was an amazing experience, an experience of a life time. The best part in Karthik, he treats you so well, you will never end up with a feeling of hesitation to express something. And he really understands things and try to provide all the help that he can. The other thing that I really like in Karthik is the freedom that he gives you to do things. He always encourages new ideas and always game for experimentation (My guy).
I am just speechless when I heard the word "leaving" from him. I am just shocked/surprised. Cant do much now. He is decided and he is moving. He is the best manager i have worked with., of course, one anyone can work with; i can only say ATB to him for all his future endeavors and I wish i would work with him some time soon.
Wednesday, June 13, 2007
Key points from June MySQL Meetup (MV chapter)
Vic (CTO, Vendio), John (NOC Engineer, Vendio) and I have attended the Silicon Valley MySQL meet up that happened at Google’s office yesterday. It was organized by Jeremy Cole who is regarded very high in the MySQL community. (I guess most of you might have heard about him before). The session was mostly a Q&A kind of thing where Jeremy answered all the questions. (Lot of questions must be repetitions for him as we (I think some more guys also!!) are attending it for the first time but he was very generous in sharing things)
Below are the things which I found interesting from the session.
a) Question 1: How good is MySQL to store images? (Same as, how good is MySQL for blobs)
Though there is no straight forward answer on how many images (size??) will MySQL hold comfortably, he is saying that we can safely rely on MySQL if the size of blob is in KB’s If the size of blob is in MB’s, then MySQL may not be right choice. One of the main reasons behind this is that MySQL doesn’t use streaming to send blobs across the network. So if there is a blob of size 1G, then it requires 1G (or more?) on server and 1G (or more?) on client too to effectively transfer the blobs. MySQL is trying to address this problem by implementing streaming in its future releases.
For storing big blobs, the other open source tool that we can really look at is MogileFS. This is a very good system for Blobs it seems.
http://danga.com/mogilefs/
b) Question 2: How good is MyISAM compared to INNODB for applications where the data is loaded only once and don't change for ever?
The one thing that MyISAM suffered from all the time is the regular data corruption. But if we have a backup of the data in the file system which we can use at any time to load it back to the DB w/o taking much of time, we can safely use MyISAM. Also one other way to cope up with data corruption easily is, at the time when we are loading the data to Research DB, try to load the same data into a backup MySQL DB and incase of any corruption we can simply override the corrupted files from the backup.
c) Question 3: How effective using Query Cache would be?
There is one very interesting point that Jeremy has made here. Query cache flushes out a query if the table on which that query operates changes. It doesn't matter whether some thing has changed with respect to the rows it has stored or not. This clearly tells that Query Cache is not an option for any application that does decent writes to the DB. It just adds an additional overhead of searching in Query Cache for every query unnecessarily. Please turn off Query Cache or add the SQL_NO_CACHE hint to all the required select queries, if you still have some compelling reasons to go for a Query Cache.
d) Question 4: What's the best way to go about backups?
Jeremy has suggested using LVM snapshots to take backups from INNODB. From his experience, INNODB hot back tool (Commercial tool from INNODB) is not recommended. From my experience, don't go for Zmanda as it is just a script on top of the things offered by MySQL. It is definitely not worth paying 500$ per license every year for this very basic s/w.
e) Question 5: What's the best way to setup MySQL Replication? (Dual-Master or Master-Slave?)
The straight answer is to go for a Dual Master setup. Two other important things he has made is that, always set read-only=1 and skip-slave-mater=1 on master. We have to this once the master comes up. The advantage of doing this is that, if for some reason master fails and we have switched to slave, and when the master comes back again, it should not accept any connections for write. And other very important point he has made here is that, in case of failure on master, never try to apply the lost transactions automatically rather do it manually by comparing the sequence numbers on slave and master. Its better to spend couple of minutes looking at what went wrong rather than spending sleepless nights if the automated script really screws something. :)
f) General Discussion:
a. Size of bin-logs can be around 768M. (Not too high or too low). From his experience, bin-logs of this size would take around 5-10mins for recovery.
b. Always give minimal space for MyISAM (64M ??) as MySQL internally uses MyISAM to store some system tables and also for creating any temp table, it uses MyISAM.
c. The o/p of show status in 4.* versions gives all global values for variables where as in 5.* to get the same o/p we have to use "show global status". "show status" now gives info only for that session.
d. Always set no-auto-rehash under the client section of the my.cnf. This makes sure that MySQL don’t try to create tab completion indexes for every new client connection.
e. There is a way to look at the life cycle of a query on MySQL. This works from 5.0.37 community and 5.0.42 enterprise onwards. Please go through the below link for extra information on this, http://dev.mysql.com/tech-resources/articles/using-new-query-profiler.html .
f. Always try to keep number of files in a directory in hundreds and not more than that as many FS’s including ext3 do a linear search of files inside a directory.
I am really impressed by the way Jeremy has handled the whole session and I am looking for the future events.
Hmm..Have to go back to work. :)
Below are the things which I found interesting from the session.
a) Question 1: How good is MySQL to store images? (Same as, how good is MySQL for blobs)
Though there is no straight forward answer on how many images (size??) will MySQL hold comfortably, he is saying that we can safely rely on MySQL if the size of blob is in KB’s If the size of blob is in MB’s, then MySQL may not be right choice. One of the main reasons behind this is that MySQL doesn’t use streaming to send blobs across the network. So if there is a blob of size 1G, then it requires 1G (or more?) on server and 1G (or more?) on client too to effectively transfer the blobs. MySQL is trying to address this problem by implementing streaming in its future releases.
For storing big blobs, the other open source tool that we can really look at is MogileFS. This is a very good system for Blobs it seems.
http://danga.com/mogilefs/
b) Question 2: How good is MyISAM compared to INNODB for applications where the data is loaded only once and don't change for ever?
The one thing that MyISAM suffered from all the time is the regular data corruption. But if we have a backup of the data in the file system which we can use at any time to load it back to the DB w/o taking much of time, we can safely use MyISAM. Also one other way to cope up with data corruption easily is, at the time when we are loading the data to Research DB, try to load the same data into a backup MySQL DB and incase of any corruption we can simply override the corrupted files from the backup.
c) Question 3: How effective using Query Cache would be?
There is one very interesting point that Jeremy has made here. Query cache flushes out a query if the table on which that query operates changes. It doesn't matter whether some thing has changed with respect to the rows it has stored or not. This clearly tells that Query Cache is not an option for any application that does decent writes to the DB. It just adds an additional overhead of searching in Query Cache for every query unnecessarily. Please turn off Query Cache or add the SQL_NO_CACHE hint to all the required select queries, if you still have some compelling reasons to go for a Query Cache.
d) Question 4: What's the best way to go about backups?
Jeremy has suggested using LVM snapshots to take backups from INNODB. From his experience, INNODB hot back tool (Commercial tool from INNODB) is not recommended. From my experience, don't go for Zmanda as it is just a script on top of the things offered by MySQL. It is definitely not worth paying 500$ per license every year for this very basic s/w.
e) Question 5: What's the best way to setup MySQL Replication? (Dual-Master or Master-Slave?)
The straight answer is to go for a Dual Master setup. Two other important things he has made is that, always set read-only=1 and skip-slave-mater=1 on master. We have to this once the master comes up. The advantage of doing this is that, if for some reason master fails and we have switched to slave, and when the master comes back again, it should not accept any connections for write. And other very important point he has made here is that, in case of failure on master, never try to apply the lost transactions automatically rather do it manually by comparing the sequence numbers on slave and master. Its better to spend couple of minutes looking at what went wrong rather than spending sleepless nights if the automated script really screws something. :)
f) General Discussion:
a. Size of bin-logs can be around 768M. (Not too high or too low). From his experience, bin-logs of this size would take around 5-10mins for recovery.
b. Always give minimal space for MyISAM (64M ??) as MySQL internally uses MyISAM to store some system tables and also for creating any temp table, it uses MyISAM.
c. The o/p of show status in 4.* versions gives all global values for variables where as in 5.* to get the same o/p we have to use "show global status". "show status" now gives info only for that session.
d. Always set no-auto-rehash under the client section of the my.cnf. This makes sure that MySQL don’t try to create tab completion indexes for every new client connection.
e. There is a way to look at the life cycle of a query on MySQL. This works from 5.0.37 community and 5.0.42 enterprise onwards. Please go through the below link for extra information on this, http://dev.mysql.com/tech-resources/articles/using-new-query-profiler.html .
f. Always try to keep number of files in a directory in hundreds and not more than that as many FS’s including ext3 do a linear search of files inside a directory.
I am really impressed by the way Jeremy has handled the whole session and I am looking for the future events.
Hmm..Have to go back to work. :)
Subscribe to:
Posts (Atom)