Unions and performance

So upgrade question about indexes. We just stood up a new server and loaded 10.2. I’m looking for stuff that’s broken and I notice that this query is taking a long time again. When you transfer and upgrade the database, so the indexes come with it? I’m not able to get in the server yet to look.

Indexes do come with it but you should reindex update stats.

Rules to live by in BAQs (I believe that most are mentioned above).

  1. when connecting two or more tables:
  • always include primary indexes whenever possible.
  • ALWAYS include the Company as one of the links
  • do not link one table to another that is not normally linked (IE… search for all OrderDtl tables where the part number = UD01.ShortChar01)… it will be slow UNLESS you index that table/column.
  1. try to collapse data in a sub-query into summaries whenever possible. SQL is very efficient in making these subqueries with summarized information (1000s of records summarized in a flash).
1 Like

If you look at the upgrade steps, one of those deletes all of the indexes and then another step creates them against again.

My experience with the couple of manual indexes that I’ve added is that you need to recreate after upgrade.

4 Likes

We are having the same issue now and never try to add indexed before cause we didn’t have to but today it really impacted the performance of several BAQs .

Thank you so much! :heart_eyes: