Forum Stats

  • 3,769,300 Users
  • 2,252,946 Discussions
  • 7,874,982 Comments

Discussions

SQL and DB performance

I am executing multiple complex select queries on direct tables as of now data is very less so everything is fine but later in future once data gets increased it will impact database and SQL cost too.

Looking for an alternate instead of hitting original tables. Need solution for execute select statement without hitting original table.

Answers

  • L. Fernigrini
    L. Fernigrini Data Engineer Sr Consultant Member Posts: 3,666 Silver Crown
    edited Oct 28, 2021 1:48PM

    There are plenty of ways to enhance performance, your question does not have any context information in order to try to figure out how to solve a problem that does not even exist right now...

    "Hitting the actual tables" is usually not a problem if it is done the right way.


    Some things you may consider:

    1) Proper indexing can help you get just the rows you need without having to read the entire table

    2) Materialized views can have summarizations pre-calculated, avoiding reading data from the original tables (at the expense of regularly updating those materialized views)


    Explain more in detail what problem you are facing so we can provide more realistic help.