February 15, 2007

SQL Server Deadlock - NOLOCK and ROWLOCK hints

Deadlock is something that will become most certainly, subject of your worries sooner or later during the lifetime of your application (or better to say database). Since MS SQL Server requires locks for SELECT, even those people who are not trying to modify database are involved in locking system. UPDATE and DELETE, obviously, requires locks. Even if you refer directly to primary key, page locks are most likely to happen in case of massive (batch) requests of same operation, because most of data will be in the same page.
Well, solution may be found in 2 little cute hints: WITH NOLOCK (for selects) and WITH ROWLOCK (for updates and deletes). With those hints you will "ask" sql server no to make any locks during selects and to lock only single row you wish to update. In short, that's it. Be careful when you are using these hints especially if your application is sensitive on data accuracy.

For further reading:
SQL Server Lock Contention Tamed: The Joys Of NOLOCK and ROWLOCK
Michael Balloni
sql-server-perfomrance.com

Do you feal dirty?
Phil Scott's blog

February 8, 2007

Yahoo! Pipes has arrived

Yahoo says:


Pipes is an interactive feed aggregator and manipulator. Using Pipes, you can create feeds that are more powerful, useful and relevant.


Actually Y! Pipes is tool which gives you ability to create your own web space using variety of different online (web) services, and, at the same time, you don't need to have any programming knowledge or skills, only by using its development interface.
You "just" need to have an idea, to know who you should ask for information and to assemble it into your own unique product.
Like a shoe making process: You don't need to be a lace manufacturer nor having a sewing machine, you "just" need to have an idea how the shoe have to look like and have a pencil to sketch it.
Idea is you, public web services are materials (leather, rubber, etc) and Y! Pipes will be your glue (sewing machine) which will assemble all that.

Read more:

Yahoo! pipes
http://pipes.yahoo.com/

Yahoo! Launches Pipes (TechCrunch - Nik Cubrilovic)
http://www.techcrunch.com/2007/02/07/yahoo-launches-pipes/

Yahoo! Pipes: The Modules For Building Pipes (O'Reilly Radar)
http://radar.oreilly.com/archives/2007/02/yahoo_pipes_the.html

Yahoo Pipes (Anil Dash)
http://www.dashes.com/anil/2007/02/08/yahoo_pipes