sql server - Fully separating data manupulation logic in SQL in order to increase performance -
i've come across idea separation of data manipulation logic in sql code result in performance gain, i'm unsure extent true , reason i'm posting question.
assuming have database (let's small gallery) in have galleries, photos, , tags. each photo can member of many galleries, , each photo or gallery can have many tags. create single stored procedure handling photo , gallery management (i.e. photocreateorupdate) can accepts array of galleries (in serialized text, i.e. gallerya:info:tag1|tag2), photo information, same photo tags, , array galleries or tags deleted when updating record. if gallery exists, relations added, else created, , same tags , other things.
i've decided instead of relying on entity framework because believe way can send 1 request database web-end , can result performance gain avoid lot of foreach loops , joins can done faster.
however, when deserialzing formatted texts, have use cursors few times equal loops when using entity framework.
i think advantage of approach segregate concerns own context , keep asp.net code clean.
i want know extent assumptions true , point of question.
Comments
Post a Comment