1
Among the many forms of development, there was a doubt about what will consume the most of my processing between the same operation in different ways...
If I have a function that can be done directly in my database (a insert
using a select
as a basic example)
Insert into Tabela1(Coluna1,2Coluna,3_coluna) select (select cod from tabela3 where tabela3.nome = tabela2.nome)as 'Coluna1',valorx,valory from Tabela2 Tabela2.cod=z
and the same function can be done through my code
MySqlCommand mySqlCommand_Select = new MySqlCommand("Busca valores tabela2", mySqlConnection);
MySqlCommand mySqlCommand_Select_2 = new MySqlCommand("Busca valores tabela3", mySqlConnection);
//...
//Unir Selects, trabalha os valores etc
//...
MySqlCommand mySqlCommand_insert = new MySqlCommand("Insere os valores tabela1", mySqlConnection);
The process being carried out the same, the cost is higher for one or the other or is equal?
The question includes other operations that can be done directly in the bank and/or code (such as calculations, other darlings used as sub or as various searches) but it comes down to the cost of 'Outsource' or not these operations for my application
Although I myself note that this not very well explained was the best way I found, but I believe that this answer is a large variant among the cases, still, what I wanted to ask was about the costs of things like large calculations and formulations for example, best would be to bring this data to my system or I can work with them still in sql(still talking about processing cost)
– Leo Longhi
@Leolonghi, analyzing the question according to your argument here. It was not clear what his goal was, I believe that because of this, it was this answer that he got.
– Diego Farias