Category: db
-
Rails/Devise authenticating using AWS/Cognito Identity
Background For a while now, I’m developing a sort of IoT controller with Rails 4. Until now, Devise was used to authenticate users locally using the Devise’s provided :database_authenticable module. Things changed recently, and I had to move some features of this IoT controller toward AWS. Authentication against AWS/Cognito Identity is one part of the project. “But Why?” you might…
-
Slow Query with “LIMIT 1” in Postgresql
Recently I had issues on a production database running slow on tables with more than 1M rows. This is a complex Ruby on Rails app connected to a Postgresql database, I went through the whole stack to figure out that it’s a simple index problem. Very few or no related doc was found about this…