Комментарии:
Additionally I think the query would speed up immensely if you changed the loop from querying a thousand times into into building a single query that has a range in it. Queries in loops are a big no go in general
ОтветитьHello post your link to code and itgers in comments
Have a nice day
Lisa
thank you so so much!
ОтветитьSo glad I found this vid. Thank you!
ОтветитьCan you optimize my script where quickly search queries from 30 billion recoreds mysql php? My now codes are simple .
ОтветитьThe code is way too small I can't see anything.
ОтветитьYou can tune the query with something like "SELECT id, SUM(price) AS INCOME FROM sales GROUP BY item, cashier" and add some "WHERE" conditions to filter just the items and/or cashier which you want (i.e WHERE cashier=5).
What you are facing is a N+1 problem. If the query is processed in an asynchronous way that cannot be a problem but in your case is synchronous so you have to focus on fixing the N+1 and you can either optimize the query as I suggested or create a projection. 11s normally isn't acceptable for loading a webpage.
Anyway a 4x gain in performance with just indexes is a good example of how powerful they can be.
can this be used in VB applications ?
Ответитьplz zoom view unable to view from mobile
ОтветитьVideo not complete what is next step
ОтветитьDon't run queries inside loop, instant performance boost. Bonus: use composite index(cashier, item), super instant performance boost.
ОтветитьYou've explained so well so please keep on coming like this video, It will help lot of people to save so much money on server costing.
Ответитьthanks bro.
ОтветитьIs it bad if I index 7-8 out of 24 columns in the table? From which factor it will affect the database which have more than 300k rows of data in table? Can you please help me with it? Thanks in advance
ОтветитьCan i make many indexes if i need to call large amount to a specific column?
ОтветитьTop Dam!!!! Tks for the tips!
Ответить