Best practices

The following checklist is a set of best practices that an SI can follow to use the DB Query Client.

  • Fetch only the required rows with an optimized query. Avoid running queries such as select * without any where clauses or conditions.
  • Set an optimal value for Number of rows, so that the queries run fast.
  • Add a space between keywords such as FROM, AS, ORDER BY, GROUP BY, and other keywords in your queries.
  • Implement SQL joins by using either the JOIN clause or with comma-separated table names. Even though you can use all these formats in the tool, ensure that your complete query does not have a combination of these formats.
  • If you have a subquery within a join query, ensure that you define the proper alias to prevent unexpected errors.
  • Do not use double quotation marks for alias names.
  • Do not run queries with the WITH UR clause.
  • If there are exceptions when you run a query, ensure that the query syntax and other details are valid. If the query is accurate, see the server logs for more information.
  • Restrict the access to DB Query Client and control the queries that are run as it might impact the performance of the production environment.
  • Optimize queries with CLOB columns to fetch minimal rows for better performance.
  • Standby database might not be temporarily reachable during the weekly maintenance window. Verify whether the current time falls within your weekly maintenance window.
  • If you want to enable trace logs for DB query tool, you can do so by adding trace for Type as YantraConsole and Name as DBQueryClient.