SELECT table_name, table_rows FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'your_database' order by table_rows;

robots.thoughtbot.com

Good article about window functions. Also note how they use a postgres feature called common table expressions.

xaprb.com

The linked article explains how to get a database-wide lock without creating table rows: This article explains how I...

makandra dev

TL;DR Block formatting contexts establish an isolating container. float and clear only apply to elements within such a container...

Right-click on the table Select Table... Select Text flow Uncheck Allow row to break across pages and columns

If you want to load an SQL dump from an ActiveRecord migration, you might find this to be harder than...

makandra dev
github.com

Geordi 1.0 features a command line application geordi, that holds most of Geordi's previous commands. New features

Add gem 'database_cleaner' to your Gemfile. Then: Cucumber & Rails 3+ # features/support/database_cleaner.rb DatabaseCleaner.clean_with(:deletion) # clean once, now DatabaseCleaner.strategy = :transaction...

matchingnotes.com

Sequel is an awesome ORM such as ActiveRecord. The linked article describes how easily you can implement and use materialized...

In the tradition of our PostgreSQL cheat sheet for MySQL lamers, here is a cheat sheet for Jasmine when you...

pgcli.com

A CLI for working with Postgres databases. Ships with auto-completion and syntax highlighting.

developer.mozilla.org

You can do so much more than console.log(...)! See the attached link for a great breakdown of what the developer...

edgeguides.rubyonrails.org

Rails guide that covers PostgreSQL-specific column types and usages for Active Record. You should especially keep in mind the...

Rails migrations allow you to use a change method whose calls are automatically inverted for the down path. However, if...

Creating records in specs can be so fast that two records created instantly after one another might have the same...

We upgraded a Rails 2 application to Rails 3.2 and Ruby 2.1, changed the mysql adapter from mysql to mysql2...

p ActiveRecord::Base.connection.indexes(:table_name)

api.rubyonrails.org

To avoid n+1 queries, you want to eager-load associated records if you know you need to access them...

blog.mailgun.com

Styling HTML email is painful. Tables, inline CSS, unsupported CSS, desktop clients, web clients, mobile clients, various devices, various providers...

makandra dev
github.com

edge_rider is Power tools for ActiveRecord relations (scopes). Please note that some of the functions edge_rider provides have...

dev.mysql.com

Directly from the MySql docs: There are three likely causes for this error message. Usually it indicates network connectivity trouble...

Open a MySQL root shell and use this command: PURGE BINARY LOGS BEFORE DATE(NOW() - INTERVAL 3 DAY) + INTERVAL 0...

When you have a string containing umlauts which don't behave as expected (are not matched with a regexp, can...

ActiveRecord caches results of SQL queries. If you want to discard the cached results for one model, you can call...