SpringBlog icon indicating copy to clipboard operation
SpringBlog copied to clipboard

Add Index on posts to Accelerate Query

Open wtune opened this issue 5 years ago • 0 comments

Problem

posts is an important table in SpringBlog and from PostRepository we can find that we always read posts by permalink and post_type.In our test, adding index on posts.permalink and posts.post_type can really improve related querys' performance up to 85%.Therefore, the performance impact for write operations is acceptable under common cases.

Possible Soultion

Add Index on posts.post_type and posts.permalink

wtune avatar Mar 19 '20 05:03 wtune