Pergunta de entrevista da empresa Apple

How to speed up a database query?

Respostas da entrevista

Sigiloso

2 de fev. de 2015

Don’t select what you don’t need s very common that you need to get only a specific number of records from your database. For example, a blog which is showing ten entries per page. In that case, you should definitely use the LIMIT paramete Avoid queries in loops

Sigiloso

29 de set. de 2015

index the field you are using in the where clause or use an indexed field in the where clause