dimanche 24 janvier 2016

How to filter cached query in Laravel

Need help/advice with this concept. I have pretty complex fluent query which pulls rows according to users filters.

I was thinking of making unfiltered (only joins, without where/whereIns) query which would be cached, and then somehow filter that cached query according to users need.

There's 2-3 seconds lag when querying db each time form filter changes, so i'm guessing this can perform better.

Now unfiltered query is around 5k rows, and average filtered one brings 500-1000 rows.

Query is around 25 columns with 4 CONCATS, 3 CASE statements and 14 leftJoins.

Is that right way? Any other suggestions?

Thanks in advance!

Y



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire