How do you optimize SQL queries ?
Answer Posted / shail
Use function based index.
Ex: you have a date column and a simple index on it.
maximum queries referring to this column of this table
are like trunc(date_column). Then the index on this column
will be ignored. For this you can have function based index
like trunc(date_column) on this column.
This will speed up your sqls.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is full join in sql?
What is the execution plan in sql?
What is difference between stored procedure and trigger?
What is procedure and function in sql?
Can we call stored procedure in function?
What is the need of a partition key?
How to check if a column is nullable before setting to nullable?
Explain mutating table error.
What is difference between rank () row_number () and dense_rank () in sql?
what is a scheduled jobs or what is a scheduled tasks? : Sql dba
what is a field in a database ? : Sql dba
What is a sql statement?
What is the difference between a database and a relational database?
Is mariadb a nosql database?
How do you write a complex sql query?