开发者

best way of oracle database partitions?

开发者 https://www.devze.com 2022-12-22 21:05 出处:网络
I have one table of 50k keywords and I am provid开发者_开发知识库ing the auto-complete feature for these keywords based on count mechanism. But still getting the keywords takes time..

I have one table of 50k keywords and I am provid开发者_开发知识库ing the auto-complete feature for these keywords based on count mechanism. But still getting the keywords takes time..

In what way would the database partitions have to be done for fast retrieving....

help me plz.....


A table with 50k rows is very small. There should be no need (and benefit) to partition it.

You need to look at the query execution plan and your algorithm in general. Maybe you just need an index. Or an in-memory cache.


some thoughts:

  • 50k keywords is not that big a table, partitions won't help, a smart index might.
  • you might fare best by loading a suitable data structure into memory first
  • if the data is in the DB your auto-complete will likely be slow and unresponsive, as every keypress results in communications with the DB.


Perhaps old table statistics, optimizer can choose wrong Plan.

Try from user with DBA role
exec dbms_stats.gather_table_stats (ownname => 'YOUR_OWNER', tabname => 'YOUR_TABLE');
alter system flush shared_pool;

And test time of getting the keywords again.

P.S. The statistics should be gathered regularly.

0

精彩评论

暂无评论...
验证码 换一张
取 消