Are long-stored procs records a sign of poor database design and coding style?

I met one person who claims to write on the 5000lines of a stored procedure on Sql Server. Should this lengthy stored procedure be needed at all? Or is it a sign of poor database and coding design? I'm really worried. I never wrote anything longer than 100 lines of code in a Stored Procedure in one of my live insurance-based projects that were supposed to deal with Chords and Supplements in the USA. By the way, he boasted as if he did a great job writing such a lengthy stored procedure.

Thanks in advance:)

Waiting for your answers.

+3
source share
2 answers

From my personal experience there are several conditions that make you write such a long stored procedure, these are two of those that I remember right now

  • Poor database design (as you mentioned)
  • A large complex formula for calculating very complex reports, etc. (e.g. Human Resources - Leave Management).

I don’t think that writing such a long stored procedure is good, I personally think that it is very bad, it shows that the database is corrupted, and was not planned carefully enough.

+4
source

I do not think that the length of the stored procedure is a sign of poor design or coding style.

I think the code in the stored procedure is a sign of poor design or coding style.

He could write

SELECT
*
FROM
TABLE
AS
t

, , , , .

, , , , sproc . , 100 sproc, , 5000 sproc.

5000 sproc, , . .

, , sproc .

+3

Source: https://habr.com/ru/post/1755694/


All Articles