How can I better optimize my PHP and MySQL Queries? -


i have website i'm working on , works fine. i'm concerned under load way doing things cause server lag.

in database have table lot of information in (14+ columns , several hundred entries). php page has script on generate page links (page 1 of 6, next page, previous, first, last, etc.). displays 25 entries per page. script multiplies page number 25 entry in table needs start on select.

that's not horrible don't think. real issue comes "page x of y". meaning need know how many pages of items there be, or how many times 25 goes number of entries. i've done using like:

select count(id) `footwear` 

to count of entries in table. using count can calculate pages. efficient way of doing things? or perhaps there's better way calculate page count?

i might recommend query caching in mysql improve general performance.

here's guide enable that: http://www.cyberciti.biz/tips/enable-the-query-cache-in-mysql-to-improve-performance.html


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -