You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
- Hi Steve, thanks for your answer. MySQL already caches queries, correct? dev.mysql.com/doc/refman/5.7/en/query-cache.html I am using MySQL 5.7.19 so that's just before the query cache was deprecated.obl– obl2017-11-11 18:03:30 +00:00Commented Nov 11, 2017 at 18:03
- Also, my table consists of an id column (primary key), name, and some other fields (i will only be searching by LIKE name in this scenario). This should suffice for the indexing, right?obl– obl2017-11-11 18:05:05 +00:00Commented Nov 11, 2017 at 18:05
- Yes it caches query but that's still asking the database to do stuff which is heavy on servers/performance time compared to local cache. And no primary key indexing is not enough, your indexing strategy ultimately depends on the way searches will be done and what the data searched is.Steve Chamaillard– Steve Chamaillard2017-11-12 12:39:27 +00:00Commented Nov 12, 2017 at 12:39
- 1Steve - I've seen your advise about server side pagination echoed many times and as a former RDBMS DBA, I cringe. Maybe I'm misuderstanding this, but if pagination is accomplished by breaking a single logical query into multiple queries by adding an additional WHERE clause or something that limits the range of results, this will slow down database access since it has to do many times the amount of work for a vastly greater number of queries.DocSalvager– DocSalvager2017-11-19 07:56:33 +00:00Commented Nov 19, 2017 at 7:56
- 1Pagination isn't accomplished by breaking a single logical query into multiple queries. The point is to not query the whole 2000 results but instead query 10 or 20 results, since you don't want to display so many results at once. 10 or 2000 results should be retrieved with the same amount of queries. I 100% agree with you that too many queries is a really bad idea (which is one of the reason of sending queries after X characters were input :)).Steve Chamaillard– Steve Chamaillard2017-11-20 09:01:15 +00:00Commented Nov 20, 2017 at 9:01
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-js