php - Website home page Load Issue -


my website home page takes more time load. when run website on,it disformed,images here , there time , after loading become ok.

there 3 tables fetches data database(my sql, php).so have 3 select queries union.

what should either keep queries on home page or should use ajax jquery populate it.?

how can improve speed of app?

i not need query again , again in hour,so can do?

one query here

select * abc union select * xyz 

measure part of code executing longest period of time. can printing html comment timestamp, go through page code. after know bottleneck , part need optimize.

few general tips:

  1. measure time of sql queries. if long make sure have proper conditions , indexes

  2. use server-side paging grids many records

  3. you can use ajax load few parts of page in parallel.

  4. caching result of long running queries way

  5. caching preprocessed result of query better

in cases best way write scratch


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -