Skip to Content
0
Former Member
Sep 25, 2014 at 10:08 AM

Is this premature optimisation? - Price factory - writing PriceRow to MySQL

190 Views

I'm getting prices, in real time, over a web service that is called whenever a user loads a product (category page, search page and product details page). Each customer will have a different price (mostly) and the PriceRow that the customer gets will only be cached for around 30 minutes.

This could lead to a large load being placed on MySQL as the PriceRows get written. Does it make sense to move the PriceRow into the users session (like cart items) rather than writing so much to the DB when the data is only valid for 30 mins or is this premature optimisation?

Edit: we're doing a load test at the end of every sprint, I feel like I shouldn't worry about performance until performance is an issue... Some do not agree with me.