Manipulate data in the DB query or in the code

Posted by DrDro on Stack Overflow See other posts from Stack Overflow or by DrDro
Published on 2010-03-19T15:48:42Z Indexed on 2010/03/19 15:51 UTC
Read the original article Hit count: 207

Filed under:
|
|

How do you decide on which side you perform your data manipulation when you can either do it in the code or in the query ?

When you need to display a date in a specific format for example. Do you retrieve the desired format directly in the sql query or you retrieve the date then format it through the code ?

What helps you to decide : performance, best practice, preference in SQL vs the code language, complexity of the task... ?

© Stack Overflow or respective owner

Related posts about query

Related posts about sql