DB View performance
Greg Wilburn <gwilburn-kuYYJ3CQfvZxq3Q2jbZZw/[email protected]>
| Newsgroups | gmane.comp.hardware.ibm.midrange |
|---|---|
| Message-ID | <PH0PR17MB4863AEAE0674D912462300F2DA082@PH0PR17MB4863.namprd17.prod.outlook.com> |
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://www.totalbizfulfillment.com/> Greg Wilburn Director of IT 301.895.3792 ext. 1231 301.895.3895 direct gwilburn-kuYYJ3CQfvZxq3Q2jbZZw/[email protected]<mailto:gwilburn-kuYYJ3CQfvZxq3Q2jbZZw/[email protected]> 1 Corporate Dr Grantsville, MD 21536 www.totalbizfulfillment.com<http://www.totalbizfulfillment.com> -- This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/midrange-l or email: MIDRANGE-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org Before posting, please take a moment to review the archives at https://archive.midrange.com/midrange-l. Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related questions.