Skip to content

sazedulhaq/QueryOptimize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OptimizeQuery

*. Personalities, PracticalSkills, BasicAbilities, etc., are not needed in the final output, removed their joins.

*. The WHERE clause has many LIKE conditions, which are computationally expensive. Consider using a full-text search if the database supports it (e.g., MySQL's FULLTEXT index).

*. The GROUP BY Jobs.id clause is used, but it not be necessary if there are no aggregate functions. Removed it.

*. The query uses LIMIT 50 OFFSET 0 for pagination. If the offset is large, this can be slow. Consider using keyset pagination (e.g., WHERE id > last_seen_id) instead of OFFSET.

*. Add indexes on foreign key columns like Jobs.job_category_id, Jobs.job_type_id, JobsPersonalities.job_id, etc.

*. Add a composite index on Jobs.sort_order and Jobs.id to optimize the ORDER BY clause.

*. Add indexes on columns used in the WHERE clause, such as JobCategories.name, JobTypes.name, Jobs.name, etc.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published