This topic contains 7 replies, has 2 voices, and was last updated by Bryan 4 years, 7 months ago.
-
AuthorPosts
-
Hello,
My website runs very slowly (in general). And especially after pressing hotel search button on the front page. It takes around (30-55) seconds more than others sites (Booking, Agoda). PLEASE, tell me why and how to increase speed. (Note: I have VPS 2GB ram, 25GB SSD).
Thanks
Hello
There are many reasons why a WordPress website is slow. Our Faq will show you more details:
Thanks
The problem comes when I press search button for hotels on the tab on the front page.
PLS be Noted:
I am using your hotel’s demo (images, details etc.).
When pressing one of the Top Destinations it is work very well (shows me the results in 4s).
I did increase to 50GB SSD.I hope to find an answer from you.
Thanks.
Hello
We will check and improve theme to make it load faster in next theme version.
Thanks
Hello,
I used Query Monitor plugin to find where functions run slowly, and that plugin shows me below query takes 38s this TIME more than usual.
SELECT ID, hotel_id, count(hotel_id) as total_room
FROM (
SELECT ID, wp_postmeta.meta_value as adult_number, st_meta1.meta_value as children_number, st_meta3.meta_value as number_room, st_meta2.meta_value as hotel_id
FROM wp_posts JOIN wp_postmeta on wp_postmeta.post_id=wp_posts.ID and wp_postmeta.meta_key=’adult_number’ JOIN wp_postmeta as st_meta1 on st_meta1.post_id=wp_posts.ID and st_meta1.meta_key=’children_number’ JOIN wp_postmeta as st_meta3 on st_meta3.post_id=wp_posts.ID and st_meta3.meta_key=’number_room’JOIN wp_postmeta as st_meta2 on st_meta2.post_id=wp_posts.ID and st_meta2.meta_key=’room_parent’ where 1=1
AND post_type=’hotel_room’
AND wp_posts.ID IN (
SELECT room_id from(
SELECT room_id, sum(room_num_search) AS total_booked, room.number_room
FROM wp_st_order_item_meta
INNER JOIN wp_hotel_room AS room
ON room.post_id = wp_st_order_item_meta.room_id
WHERE 1 = 1
AND ( ( check_in_timestamp <= 1530230400
AND check_out_timestamp >= 1530230400 )
OR ( check_in_timestamp >= 1530230400
AND check_in_timestamp <= 1530316800 ) )
AND st_booking_post_type = ‘st_hotel’
AND STATUS NOT IN ( ‘trash’, ‘canceled’, ‘wc-cancelled’ )
GROUP BY room_id Having room.number_room – total_booked < 1 ) as booked_table )
OR wp_posts.ID IN (
SELECT post_id
FROM wp_st_room_availability
WHERE 1 = 1
AND ( check_in >= 1530230400
AND check_out <= 1530316800
ANDstatus
= ‘unavailable’ ) )
OR wp_postmeta.meta_value < 1
OR st_meta3.meta_value < 1
GROUP BY wp_posts.ID ) as room_data
GROUP BY hotel_id
HAVING total_room >= (
SELECT count(post_id)
FROM wp_postmeta
WHERE meta_key = ‘room_parent’
AND meta_value = hotel_id )Do YOU explain to me how to solve that?
Hello
That is just a SQL code to get data following your condition. Theme has been improved loading speed in latest version 2.1. We will continue improve to make theme better in next version.
Thanks
Hi,
Before waiting for your update, I mean which line of that query should edit/delete/ignore to escape slow mode.
I have to start my project nowadays!!
Thanks for understanding.
Hello
We will update theme to make it work better in next version.
Thanks
-
AuthorPosts
The forum ‘Traveler’ is closed to new topics and replies.