performance - Oracle Query/SQL tuning -


i have table total 198695 records , 96579 records project_id =555. have list interval partitioned table project_id. if run below query(without distinct),it takes 0.75 secs run.

select  kw,search_volume,target_url,keyword_type,rank_date,rank,url,domain alps_project_theme_kw_v  min_rank =1 , project_id = 555; 

while if add distinct , run below query, takes 15 secs run

select distinct kw,search_volume,target_url,keyword_type,rank_date,rank,url,domain alps_project_theme_kw_v  min_rank =1 , project_id = 555; 

for results fetched both distinct , non distinct query same (1636 rows) can please suggest how should further tune query? please note:- have partitioned table on project_id mentioned above , analyzed ,have not created indexes.

i suggest adding index on project_id reduce execution time. if dont want add index base table, copy o/p temp table, create index on temp table , fire distinct query, bet faster 15 sec.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -