Hello. In the samopisny engine page navigation is implemented as

  1. First all counts are counted (select count)
  2. Data is selected (select ..... limit $ openPage, 10) Ie everything is standard.

The database has 600 thousand records, because of which the download is

  1. no index 14 seconds
  2. with indices - 3 seconds

Tell me, is it possible to somehow make it so that not all the records are preliminarily considered, but for example 30 (three pages)? Type do limit For count

Well, or your other recommendations. thank

  • keep a simple count of the number of a separate entry - etki
  • But does it make sense to keep it separate in the database if I have various filters or categories on my site? - Sarkis Allahverdian
  • + try to split the 2 request into two: 1 part - do select id ... limit $openPage, 10 (id on the id field), 2 part - do select * from ... where id in (список номеров из первой части) - Visman
  • broke according to your advice, but did not understand what it could give .. In practice, nothing has changed - Sarkis Allahverdian
  • in this case, you need a search engine instead of the base - etki

0