Currently, our Magento 2.3.4 speed is so slow.
With the homepage, it takes 5 secs to load with 200 MySQL queries running.
But with the category, it takes 20 secs and nearly 3000 queries.
Can you please let me know how to log the MySQL queries on the category page load?
Related
I have two different users however one user is taking more than 2 mins to get the results from the view and have only 47 records and second in taking 0.48 sec to get the records from the same view and have records in thousands. How is this possible? Both are running in same view, same environment. Please guide what steps need to be follow to get this analysis done.
I have a Node named "Event" how I put all events performed by my web portal
Now I have 1 500 000 Events!
So when I count the number of Event, I do this query :
MATCH (e:Event) RETURN count(e) AS numberOfEvent
But it's extremly slow : 25 000 ms!
The same query, in a classical SGBD like Postgres, is executed in 200 ms!
Is it normal or my query isn't correctly written?
Regards
Olivier
Is that the first time you run the query? Can you run it again?
I think postgres stores the total count, while neo will actually load the data.
So you measure your disk speed for loading the data.
We will work on improving that by using our database statistics internally for this kind of queries.
I have a issue in my Magento Backoffice.
If i try to browser Catalog-> Manage products it takes up to 15seconds to open the page (20 results per page). Also if I try to move from page 1 to page 2 of the results it takes the same time.
If i open all other section menu of backoffice it takes maximum 0.5 sec.
Please note i have 160.000 sku in Magento
I am on a dedicated server with 24 Gb RAM and 250 SSD RAID 1
I have FastCgi Ngnix APC Memcached installed
It's this log delay maybe related to same table issue?
How can a 20 page result take all this time to open?
Things looks better now,
here what i did:
I discovered core_url_rewrite table was over 5 gb !!!
and Flat catalog and Flat categry in Magento backoffice where setted on "No".
I did a trucante of core_url_rewrite and enabled Flat Catalog and Poduct in magento backoffice.
I then did a full reindex.
Now timing is decreased from 15 sec to 4-6 seconds.
Hope it can help someone
i need a simple help..... on my hosting they have recently added a limit for the queries/hours
and my problem is that i have a couple of magentos installation with over 10k products...
for the import i use Magmi and i saw that it has the stats when import... so what i want to know which of theese numbers are the actual query executed ( if there is)
Global Stats
Imported Elapsed Recs/min Attrs/min Last 0.5%
3204 items (100%) 29.4436 6530 398330 0.0721
DB Stats
Requests Elapsed Speed Avg Reqs Efficiency Last 0.5%
70414 17.0054 248441 reqs/min 21.98/item 57.76% 198 reqs
thank you in advance.
Fabio
One thing to keep in mind, implement all the caching you possibly can. HTML blocks caching, APC cache, full page caching (third party module required if you're not on Enterprise) all cache data retrieved from the database. If you're pulling it from cache, you don't need to hit the database till the data needs to be refreshed. This makes the site more responsive and is a win all round.
At the command line in SSH, you can issue the command:
mysqladmin status -u dbuser -pdbpass
dbuser and dbpass being your mysql user and password. It will kick back a line:
Uptime: 1878 Threads: 1 Questions: 8341 Slow queries: 2 Opens: 8525 Flush tables: 1 Open tables: 512 Queries per second avg: 4.441
This gives you your server uptime and average queries per second. This server should have processed approximately 8340 queries in the time the server was up (uptime x queries per sec)
Another way to see what's going on is to use mysql itself
mysql -u dbuser -pdbpass dbname -Bse "show status like 'uptime';"
mysql -u dbuser -pdbpass dbname -Bse "show status like 'queries';"
You could then set up a cron that logs the queries status entry every hour and the queries per hour are the current total queries minus the previous total queries.
I am still new into Codeigniter framework. Today I read about Database Caching http://codeigniter.com/user_guide/database/caching.html and Web Page Caching http://codeigniter.com/user_guide/general/caching.html.
I am a bit confused if database caching makes any big sense once page view is already in cache. So if the page is in cache, it won't go to database anyway.
The only point I see in the following scenario:
If I load 30 results from db, then use php to shuffle results and pull from array 10 results. Next time when page cache is deleted, I will still have 30 results from db in cache, but this time there will be different results after shuffle those 30 results.
Am I missing something, is there any other scenario when having database cache would bring any benefit when using also page caching?
Database caching can benefit you also when using page caching. If your page is generated by several database queries, where some data is constant while the other changes frequently.
In this case you will want to set the page caching to a short time period and retrieve the new data from the database each time while using the same constant data without querying the database.
Example: lets say your frequent data needs to be refreshed every 5 minutes while the constant data changes every 24 hours. In this case you will set the page caching to 5 minutes. Over a period of 24 hours you have queried the database 288 times for the frequent data but have queried for the constant data only once. It totals to 289 queries instead of 576 if you haven't used database caching.