Monthly Archives: March 2012

Execute SQL Query On Single Processor

I had to execute a query on my system and wondered how a parallel execution on single processor differs from executing the same in multiple processor,so i have used this small fragent or so colled option to force my query to run on single processor, surprisingly the results where faster when compared to multi processor execution .. Also do rember this does not apply to all queries, will be trying to find the reason for this abnormal but awesome behaviour

So how to Force Execute on Single processor?

At the end of your query just give

OPTION (MAXDOP 1)

 

Example:

Select *

From DB

OPTION (MAXDOP 1)

 

Try it out and see performance difference using the Execution Plan Tab on VS!

Zip in Terminal (Mac/Linux)

Need to Zip Contents Using Terminal?

Why?

1.Because Your are working remotely?

2.May be your Connected to a machine Via SSH or alternative for it

3.You have access to Terminal Only

4.Duh! Just Wanna Know

Here are the steps:

1.Go to the Directory Which has the folder to be zipped (here Directory is Rahul and it has folder called Progs that has to be zipped

2.Use zip -r A B

Where A is the name of the eventually zipped file

B is the Folder to be Zipped

-r is Recursively descent the contents and apply zip (needed)

Screenshot:

Terminal Zip.png



Why Vim Has hjkl as Arrow Keys

Ah Vim.. The Great Editor, since you are here you probably know what this editor is and how great this is. if not Bing it !

 

You might wonder why Vim has hjkl as the Arrow keys and why not the usual awds keys (which you find in most of the games)

Heres the reason:

When Bill joy created the Vi Editor , he was actually working on ADM-3A Keyboard that had arrows printed on hjkl and hence the reason :D (pretty simple right) :D

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: