article thumbnail

Lessons Learned: Sharding for startups

Startup Lessons Learned

Ive done this before using a structured comment added to each SQL statement, like this: /*entity customer://1234 */ SELECT name FROM customer WHERE id = 1234 At the expense of some additional parsing overhead in your data-access layer, you get additional metadata associated with every query in your application.