Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7510759
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:19:22+00:00 2026-05-29T23:19:22+00:00

I am trying to tune a query in Teradata. It’s pretty huge, so I

  • 0

I am trying to tune a query in Teradata. It’s pretty huge, so I am giving below the outline:

SEL column_1, column_2......column_20, sum(column_21), sum(column_22),.....sum(column_30)
from table_a a
inner join table_b b
on conditions...
group by column_1, ...,column_20;

I am trying to tune this. It’s hitting a performance roadblock in the group by. The tables A and B are huge (more than 2 billion records).

I tried the following options, but none of them improved the performance:

1) Collected all necessary stats

2) Created a JI on the columns from table A and B

3) Created an AJI on the columns and the summations from table A and B

4) Created a SI on each of the tables for the columns involved in group by.

Can someone suggest how to proceed further?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:19:24+00:00Added an answer on May 29, 2026 at 11:19 pm

    It is very hard to say anything , without having any details about:

    • query (is it always they same, or there is always different WHERE )
    • structure of A and B (primary indexes/partitioning)
    • execution plan
    • log of execution (to see where is the bottleneck)

    But if we assume that this single query is exactly the same every time then AJI is created and used during execution, then then only improvement that I can think of would be trying to adjust primary index of JI, so its distribution among amp would be as uniform as possible

    (BTW if AJI is used then steps 2 & 4 would be waste of your time and db space)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to further tune this query. The query returns the status for three
A coworker and I are trying to fine tune a very simple query. He
I'm trying to fine-tune my MySQL server so I check my settings, analyzing slow-query
am not quite advanced python user, I am stuck trying to populate the below
I am working with a large PostgreSQL database, and I am trying to tune
So I'm trying to fine tune this slow ass controller action with New Relic
I'm trying to tune the performance of my application. And I'm curious what methods
I'm trying to tune the GC such that it won't kick in during a
I'm trying to tune my JSF application memory consuption by setting JVM arguments because
I am writing a webserver of my own and I’m trying to tune its

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.