Which experts know what reason is this?
CodePudding user response:
Stored procedure fast, of course!If it is slow, the algorithm has a problem or other reasons!
CodePudding user response:
Can actually run as a result, SQL syntax is fast. The stored procedure takes 5 seconds, and SQL syntax 1 seconds OKOnly in the syntax to SUM function, and the rest is to take multiple tables of data
And there is no other complex calculation
CodePudding user response:
To post your SQLAnd the definition of your stored procedure statement
Database, involves the index table
CodePudding user response:
Is it because you're too simple SQLWrite directly than a code with process short, ha ha
CodePudding user response:
Stored procedure is applicable to the more complex algorithms, if only to retrieve or insert, update records, I feel or use SQL statements directly is more convenient,CodePudding user response:
Ha ha ha, of course, on the whole, is a SQL statement is slow, but if more simple query, SQL indeed quicker, execute the stored procedure background work obviously than direct write statement in SQL/plus much more!!CodePudding user response:
Simple, fast, of course, is the direct SQL statementSQL statements directly, it is finished in query server, the result has passed through the network
And storage process, want to call first compiled stored procedure beforehand, executing SQL statements, then transfer the results to
If direct SUM statements, or use the SQL statement
If there is a complex operations, involving the integrity of the data table, the stored procedure is better
CodePudding user response:
Unknown LZ talking aboutCodePudding user response:
Wait for people to answer.