×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




That’s how I started.
I retrieved the SQL source using ACS *before* adding the new column. I literally added:

“ or replace” on the create statement
“, count(odctt#) as line_cnt” at the end of the select statement

From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Rob Berendt
Sent: Wednesday, May 27, 2026 1:48 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: DB View performance


Did you use the tool to retrieve the SQL source of your old view and
compare it to the one you recreated without the new column?

On Wed, May 27, 2026 at 1:42 PM Greg Wilburn <
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>> wrote:

I have a relatively complicated database view that references other
views. Back in 2020, I was able to create some indexes to improve
performance when this view was used.

Without going into a lot of detail, I added a column to the view to simply
count the lines in the primary table (the view already groups results). I
did this generating the DDL from ACS Schemas tool. Using run sql scripts,
I did a "create or replace view" after adding the column. This change
killed the performance, so I removed the new column and ran "create or
replace view" again.

Now to the odd part... the performance was still horrible. I didn't know
what to do, so I restored the view from our cloud backup - this fixed the
performance issue.

My question is why? What is happening behind the scene that I'm not
considering?
I honestly can't imagine that adding a "count(myfield) as mynewfield"
column would dramatically affect the performance.

Greg
[Logo]<https://protect.checkpoint.com/v2/r01/___https://www.totalbizfulfillment.com/___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OjY5NDg6ZTVlN2ZmNmVjZGMwOWRkNWNiOGU5ZWZhMTMxZDIyMTcxZTk3OGZiM2Q3ZmRhNWEyN2NjOGEyYjljNmM4YmQ4NzpwOlQ6Rg<https://protect.checkpoint.com/v2/r01/___https:/www.totalbizfulfillment.com/___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OjY5NDg6ZTVlN2ZmNmVjZGMwOWRkNWNiOGU5ZWZhMTMxZDIyMTcxZTk3OGZiM2Q3ZmRhNWEyN2NjOGEyYjljNmM4YmQ4NzpwOlQ6Rg>> Greg Wilburn
Director of IT
301.895.3792 ext. 1231
301.895.3895 direct
gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx<mailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx%3cmailto:gwilburn@xxxxxxxxxxxxxxxxxxxxxxx>>
1 Corporate Dr
Grantsville, MD 21536
https://protect.checkpoint.com/v2/r01/___www.totalbizfulfillment.com___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OjA1MzA6NmVkZjlkNjQ0MWZjNDYxOWZjOGY2NzdlZWMwMDhmMjM2Zjc5YmE3NmM5ZjI1NGI2ODE0MDkxZTZlNmM4M2E0NDpwOlQ6Rg<https://protect.checkpoint.com/v2/r01/___http://www.totalbizfulfillment.com___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OmMzY2I6NDJjMmNhMmY3YjU3NWNlZTM0NzlmMDU2ZWU4M2Y3ZmFkMzUzZWQ0YWYzZmZhZTczMzZlNWY0Mjc2MjIyZjhjNjpwOlQ6Rg<https://protect.checkpoint.com/v2/r01/___www.totalbizfulfillment.com___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OjA1MzA6NmVkZjlkNjQ0MWZjNDYxOWZjOGY2NzdlZWMwMDhmMjM2Zjc5YmE3NmM5ZjI1NGI2ODE0MDkxZTZlNmM4M2E0NDpwOlQ6Rg%3chttps:/protect.checkpoint.com/v2/r01/___http:/www.totalbizfulfillment.com___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OmMzY2I6NDJjMmNhMmY3YjU3NWNlZTM0NzlmMDU2ZWU4M2Y3ZmFkMzUzZWQ0YWYzZmZhZTczMzZlNWY0Mjc2MjIyZjhjNjpwOlQ6Rg>>
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://protect.checkpoint.com/v2/r01/___https://lists.midrange.com/mailman/listinfo/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OjI5NGM6ZWEzZTUyOGRiNzE1ODU2YWE0MjYyYjYwNGQwODhlMmY1Zjg5NzA2M2Q3ZGZmZWNmY2U4MGFmZDFlN2NmNWE2MDpwOlQ6Rg<https://protect.checkpoint.com/v2/r01/___https:/lists.midrange.com/mailman/listinfo/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OjI5NGM6ZWEzZTUyOGRiNzE1ODU2YWE0MjYyYjYwNGQwODhlMmY1Zjg5NzA2M2Q3ZGZmZWNmY2U4MGFmZDFlN2NmNWE2MDpwOlQ6Rg>
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://protect.checkpoint.com/v2/r01/___https://archive.midrange.com/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OjU1YjU6YTBlZDI2MjgyNTgwNjdiM2UzNWJhYzE5Y2FhYWQ4OWE3Y2EwMDQzNzdiZGRkMDUxZTc4YTE4Zjk3ZWRmN2U4YzpwOlQ6Rg<https://protect.checkpoint.com/v2/r01/___https:/archive.midrange.com/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OjU1YjU6YTBlZDI2MjgyNTgwNjdiM2UzNWJhYzE5Y2FhYWQ4OWE3Y2EwMDQzNzdiZGRkMDUxZTc4YTE4Zjk3ZWRmN2U4YzpwOlQ6Rg>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related
questions.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://protect.checkpoint.com/v2/r01/___https://lists.midrange.com/mailman/listinfo/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OmZjZDc6Zjc0ODNhY2NhOGRlZTQ1YzRjYWEzMTA1NDk4MzgwOWE5Y2VhNTc4YTM3MTAwZTk1MTNjNTNlMDZlMGQ5OTkxNDpwOlQ6Rg<https://protect.checkpoint.com/v2/r01/___https:/lists.midrange.com/mailman/listinfo/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OmZjZDc6Zjc0ODNhY2NhOGRlZTQ1YzRjYWEzMTA1NDk4MzgwOWE5Y2VhNTc4YTM3MTAwZTk1MTNjNTNlMDZlMGQ5OTkxNDpwOlQ6Rg>
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://protect.checkpoint.com/v2/r01/___https://archive.midrange.com/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OmQxOTY6YjA3OWU3NjcxZDY4OGI2ZDVjYTViMGZlZWU0NjlkZmUxNGNkYWNhOGNkYzAwZGQyYzg3Y2FjZDJjZGZiNGZjZjpwOlQ6Rg<https://protect.checkpoint.com/v2/r01/___https:/archive.midrange.com/midrange-l___.YzJ1OnRvdGFsYml6ZnVsZmlsbG1lbnQxOmM6bzphZTdkMTIwNWQwZTQ1N2Y1MTY1Mzc3N2Y4M2M4NzYzNTo3OmQxOTY6YjA3OWU3NjcxZDY4OGI2ZDVjYTViMGZlZWU0NjlkZmUxNGNkYWNhOGNkYzAwZGQyYzg3Y2FjZDJjZGZiNGZjZjpwOlQ6Rg>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.

Greg Wilburn
Director of IT
301.895.3792 ext. 1231

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.