The Well Grounded Rubyist – Syntax Question – Optional Argument or Hash Argument

I’m currently going through “The Well Grounded Rubyist 2nd Edition” I’m on page 296 and have been given the following code class Person attr_accessor :age def initialize(options) self.age = options[:age] end def teenager? (13..19) === age end end what does options[:age] refer to? is it an optional argument or something? If I were writing that…

Details

Slow query when adding an extra WHERE

I have a query that is performing as expected when running it with one or 2 filters. But when i add a third it seems the execution plan changes and kills performance. query with 2 filters EXPLAIN ANALYZE SELECT “ed_system”.”name”, “ed_system”.”geom”::bytea, ( “ed_system”.”geom” <<->> ST_GeomFromEWKB(‘\x01010000a0e6100000000000000000000000000000000000000000000000000000’::bytea) ) AS “distance” FROM “ed_body” INNER JOIN “ed_system” ON (“ed_body”.”system_id”…

Details