Who is down today

In fact friday, wordpress was with a suprise for  wp users.It doesn't work for 110 minutes, almost two ours, ~9% of a day! Did you know that in this time, my blog was without problems?

WordPress crush

:)


Posted by: admin
Posted on: 2/21/2010 at 5:50 PM
Tags: ,
Categories: WeekEnd | WWW
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Alain de Botton - A kinder, gentler philosophy of success

Alain de Botton speaks about succes in a show called "A kinder, gentler philosophy of success". It is interesting, some how he "helps you".

Interesting!


Posted by: admin
Posted on: 2/21/2010 at 3:58 PM
Tags: , ,
Categories: Life
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed

Sql optimizations - subqueries

 

Problem: in mssql, to insert into a destination table, data from a source table - only data that is not already inserted.

1st solution, a simple query like [1]; but when you have to run for more data, this will go bad. And here is the solution:

 

When using querys in anotherr query, a good ideea in order to made a opitmized query is to use in subquery what you have to process, not what you want to exclude:

 

[1] Wrong:

insert into table_destination select * from table_source where identifierfield not in (select identifierfield from table_destination)

 

[2] To corect this, you have to change somehow the expression "where identifierfield not in" into a expression like "where identifierfield in". So, the optimized way of this query should look like:

insert into table_destination select * from table_source where identifierfield in (select identifierfield from table_source s left join table_destination d on d.identifierfield = s.identifierfield where d.identifierfield is null)

 


Posted by: admin
Posted on: 2/15/2010 at 3:41 AM
Tags: , , ,
Categories: Community | SQL
Actions: E-mail | Kick it! | DZone it! | del.icio.us
Post Information: Permalink | Comments (0) | Post RSSRSS comment feed