Skip to main content
rephrased a badly worded sentence ( locking up the sga )
Source Link
druzin
  • 2.3k
  • 13
  • 15

For simple SQL statements, such as the one you're describing, there is indeed an overall hit on performance in an Oracle DB. Since the DBMS must soft parse the sql each time (which also takes up a little bit of time), it then needs to lock up thewrite to SGA and might end up taking away resources from already parsed execution plans from static queries, since the SGA is not infinite. If you're running a lot of statements in dynamic SQL within procedures, you'll experience deterioration of performance over time. Keep in mind that catching errors caused by dynamic SQL is a lot trickier than errors raised by standard SQL statements.

I'd recommend only resorting to dynamic SQL if you're doing complex administrative work with db objects, or if your query differs greatly with input to procedures. Even in those cases you'd be better off with if / else statements dictating your queries.

For simple SQL statements, such as the one you're describing, there is indeed an overall hit on performance in an Oracle DB. Since the DBMS must soft parse the sql each time (which also takes up a little bit of time), it then needs to lock up the SGA and might end up taking away resources from already parsed execution plans from static queries, since the SGA is not infinite. If you're running a lot of statements in dynamic SQL within procedures, you'll experience deterioration of performance over time. Keep in mind that catching errors caused by dynamic SQL is a lot trickier than errors raised by standard SQL statements.

I'd recommend only resorting to dynamic SQL if you're doing complex administrative work with db objects, or if your query differs greatly with input to procedures. Even in those cases you'd be better off with if / else statements dictating your queries.

For simple SQL statements, such as the one you're describing, there is indeed an overall hit on performance in an Oracle DB. Since the DBMS must soft parse the sql each time (which also takes up a little bit of time), it then needs to write to SGA and might end up taking away resources from already parsed execution plans from static queries, since the SGA is not infinite. If you're running a lot of statements in dynamic SQL within procedures, you'll experience deterioration of performance over time. Keep in mind that catching errors caused by dynamic SQL is a lot trickier than errors raised by standard SQL statements.

I'd recommend only resorting to dynamic SQL if you're doing complex administrative work with db objects, or if your query differs greatly with input to procedures. Even in those cases you'd be better off with if / else statements dictating your queries.

I'd love an SGA that's not finite :)
Source Link
Mat
  • 10.2k
  • 4
  • 43
  • 40

For simple SQL statements, such as the one you're describing, there is indeed an overall hit on performance in an Oracle DB. Since the DBMS must soft parse the sql each time (which also takes up a little bit of time), it then needs to lock up the SGA and might end up taking away resources from already parsed execution plans from static queries, since the SGA is not finiteinfinite. If you're running a lot of statements in dynamic SQL within procedures, you'll experience deterioration of performance over time. Keep in mind that catching errors caused by dynamic SQL is a lot trickier than errors raised by standard SQL statements.

I'd recommend only resorting to dynamic SQL if you're doing complex administrative work with db objects, or if your query differs greatly with input to procedures. Even in those cases you'd be better off with if / else statements dictating your queries.

For simple SQL statements, such as the one you're describing, there is indeed an overall hit on performance in an Oracle DB. Since the DBMS must soft parse the sql each time (which also takes up a little bit of time), it then needs to lock up the SGA and might end up taking away resources from already parsed execution plans from static queries, since the SGA is not finite. If you're running a lot of statements in dynamic SQL within procedures, you'll experience deterioration of performance over time. Keep in mind that catching errors caused by dynamic SQL is a lot trickier than errors raised by standard SQL statements.

I'd recommend only resorting to dynamic SQL if you're doing complex administrative work with db objects, or if your query differs greatly with input to procedures. Even in those cases you'd be better off with if / else statements dictating your queries.

For simple SQL statements, such as the one you're describing, there is indeed an overall hit on performance in an Oracle DB. Since the DBMS must soft parse the sql each time (which also takes up a little bit of time), it then needs to lock up the SGA and might end up taking away resources from already parsed execution plans from static queries, since the SGA is not infinite. If you're running a lot of statements in dynamic SQL within procedures, you'll experience deterioration of performance over time. Keep in mind that catching errors caused by dynamic SQL is a lot trickier than errors raised by standard SQL statements.

I'd recommend only resorting to dynamic SQL if you're doing complex administrative work with db objects, or if your query differs greatly with input to procedures. Even in those cases you'd be better off with if / else statements dictating your queries.

Source Link
druzin
  • 2.3k
  • 13
  • 15

For simple SQL statements, such as the one you're describing, there is indeed an overall hit on performance in an Oracle DB. Since the DBMS must soft parse the sql each time (which also takes up a little bit of time), it then needs to lock up the SGA and might end up taking away resources from already parsed execution plans from static queries, since the SGA is not finite. If you're running a lot of statements in dynamic SQL within procedures, you'll experience deterioration of performance over time. Keep in mind that catching errors caused by dynamic SQL is a lot trickier than errors raised by standard SQL statements.

I'd recommend only resorting to dynamic SQL if you're doing complex administrative work with db objects, or if your query differs greatly with input to procedures. Even in those cases you'd be better off with if / else statements dictating your queries.