E select 10 records from and 1st table and n no of records from 2nd table any suggestions how to do this?

|
Dark Matter 2022-01-04 15:22:30
Or rather, use a search engine software such as elasticsearch
flyingdragons 2022-01-04 15:22:48
Dark Matter 2022-01-04 15:22:09
Why don’t you cache the queries

Currently I do cache the queries. But for the initial load its taking some time

flyingdragons 2022-01-04 15:24:57
Dark Matter 2022-01-04 15:22:30
Or rather, use a search engine software such as elasticsearch

Elastic search wont be needed and its an overkill of our application as we dont have that much parameters to serach for.

We are encountring the lag basically.

For analytics we are using cronjobs and storing the data in mongo db and caching them for the faster pulling

flyingdragons 2022-01-04 15:25:29
MySQL is giving us the challenge. And as I am a single developer in the company having bit hard time
sbruder 2022-01-04 15:26:37
I don’t understand why you are doing this “users far away then it’s mysql’s fault”
sbruder 2022-01-04 15:27:20
again, web app is only one instance / deploy, local to the mysql database?
sbruder 2022-01-04 15:27:35
or do you have external usage of your mysql database?
flyingdragons 2022-01-04 15:28:27
sbruder 2022-01-04 15:27:20
again, web app is only one instance / deploy, local to the mysql database?

Basically only one instance and in future once we release the application based on the users country we have to do load balanced servers

iyeoluwa 2022-01-04 15:28:55
Hello guys please help my friend Dura fill this survey on php for her final year project

https://docs.google.com/forms/d/1u1zD2a-sWXKoZE6GBjnNlVujCJQl7shIKbY4neFAtTs/edit?chromeless=1

TheGuyi 2022-01-04 15:31:17
Dark Matter 2022-01-04 14:39:50
where’s the edit modal

i am using the same modal for create and edit , using an if to call edit and create

sbruder 2022-01-04 15:32:21
flyingdragons 2022-01-04 15:28:27
Basically only one instance and in future once we release the application based on the users country we have to do load balanced servers

so you are barking at the wrong tree. use a CDN and make your pages as cacheable as possible (ie, load PII as ajax or something)

sbruder 2022-01-04 15:33:12
a local mysql database in india does not make any sense, will only make things even worse because laravel itself is still in the same place.
flyingdragons 2022-01-04 15:33:52
sbruder 2022-01-04 15:32:21
so you are barking at the wrong tree. use a CDN and make your pages as cacheable as possible (ie, load PII as ajax or something)

laravel_discuss-103977.jpg
Already I have cached project ASSETS bro using NGINX. See the image.

flyingdragons 2022-01-04 15:34:38
sbruder 2022-01-04 15:33:12
a local mysql database in india does not make any sense, will only make things even worse because laravel itself is still in the same place.

Then should I go for horizontal scaling of my application?

sbruder 2022-01-04 15:34:57
that’s ok, but it’s not the same thing as a CDN. a content delivery network will cache NEAR THE CLIENT, in this case, in servers in india.
flyingdragons 2022-01-04 15:36:16
sbruder 2022-01-04 15:34:57
that’s ok, but it’s not the same thing as a CDN. a content delivery network will cache NEAR THE CLIENT, in this case, in servers in india.

Hmmm okay go your point for static assets. But the major hurdle for me is mysql lag

sbruder 2022-01-04 15:37:16
no, it’s not. a local user and an indian user will get the SAME performance from the database, because that latency (from PHP to MYSQL) is the same, no matter where the client is.
sbruder 2022-01-04 15:37:59
what you are seeing is latency / lag from the client to the actual php app, actual distance between client and your laravel app.
flyingdragons 2022-01-04 15:38:17
sbruder 2022-01-04 15:37:16
no, it’s not. a local user and an indian user will get the SAME performance from the database, because that latency (from PHP to MYSQL) is the same, no matter where the client is.

Hmmmmm. Anyway to overcome this kind problem?

sbruder 2022-01-04 15:38:55
distance induced lag is unavoidable, the limit here is literally the speed of light.
flyingdragons 2022-01-04 15:39:28
sbruder 2022-01-04 15:38:55
distance induced lag is unavoidable, the limit here is literally the speed of light.

He he he 🙂

sbruder 2022-01-04 15:39:30
hence, the only solution is to have local instances, or make it more cacheable and use a CDN
flyingdragons 2022-01-04 15:40:30
sbruder 2022-01-04 15:39:30
hence, the only solution is to have local instances, or make it more cacheable and use a CDN

Thank you very much will work on it and try improvising the performance

sbruder 2022-01-04 15:41:03
flyingdragons 2022-01-04 15:40:30
Thank you very much will work on it and try improvising the performance

you can even calculate the network latency based on distance: https://www.rfwireless-world.com/calculators/Network-Latency-Calculator.html

Network Latency Calculator | Network Latency FormulaRfwireless-World
This page covers Network Latency Calculator calculates Network Latency.This calculator on the network latency takes propagation delay and serialization delay for calculation.The Network Latency formula used in this calculator is also mentioned.
flyingdragons 2022-01-04 15:42:46
sbruder 2022-01-04 15:41:03
you can even calculate the network latency based on distance: https://www.rfwireless-world.com/calculators/Network-Latency-Calculator.html

Awesome. Thanks for the link

2022-01-04 17:22:42
Do you suggest using Vue or Livewire ?
And Why
natghi2010 2022-01-04 17:23:34
2022-01-04 17:22:42
Do you suggest using Vue or Livewire ?
And Why

I prefer vue because its vue.

Shiv_95 2022-01-04 17:23:59
I would also like to know
natghi2010 2022-01-04 17:26:10
Shiv_95 2022-01-04 17:23:59
I would also like to know

The reality is Vue will benefit you way more than Livewire will in terms of developer experience and job oppurtunity.

Anshu594 2022-01-04 17:57:10
laravel_discuss-104000.jpg

Yamraj117 2022-01-04 17:58:44
Is their any project realted about seat booking or restaurant table booking
Anshu594 2022-01-04 18:00:15
Anshu594 2022-01-04 17:57:10

Any ?

Shiv_95 2022-01-04 18:06:46
Hi guys I hope everyone is doing great I have a query regarding SQL I have 2 tables and I am using a join and it’s a one to many relationship tables so I want to use pagination but I want to set limit to table 10 I.e select 10 records from and 1st table and n no of records from 2nd table any suggestions how to do this ?
Kaushikkt 2022-01-04 18:11:20
Shiv_95 2022-01-04 18:06:46
Hi guys I hope everyone is doing great I have a query regarding SQL I have 2 tables and I am using a join and it’s a one to many relationship tables so I want to use pagination but I want to set limit to table 10 I.e select 10 records from and 1st table and n no of records from 2nd table any suggestions how to do this ?

Use sub-query.

Shiv_95 2022-01-04 18:24:08
Kaushikkt 2022-01-04 18:11:20
Use sub-query.

Can you share me a example?

|