成员话题列表不加载之前的内容?但 https://ruby-china.org/ruby-china 似乎是加载了..
后面的图片有意思啊
- 工作时间:朝 11 晚 6 & 双休
- 带薪年假:14 天
- 带薪病假:7 天
- 带薪事假:7 天
用一条语句
是一个伪需求啊!你的真实需求其实应该是速度快
,一条语句当然可以写,但是其实不如分开快...你看 Rails 的分页其实都是两条 SQL 的,没必要追求一条 SQL...
正需要
10 lines of code = 10 issues. 500 lines of code = "looks fine." Code reviews.
「Twitter 表示使用心形"Like"按钮后 用户使用率增加 6%」
不需要安装的..
ag before_filter `bundle show --paths`
这个问题有意思~~
可以先搞定如何不用limit
关键字实现limit
:
set @i = 0; select @i := @i + 1 AS sort_id, id from users where @i < 5;
Query OK, 0 rows affected (0.00 sec)
+---------+-----+
| sort_id | id |
+---------+-----+
| 1 | 194 |
| 2 | 1 |
| 3 | 5 |
| 4 | 6 |
| 5 | 7 |
+---------+-----+
5 rows in set (0.00 sec)
同理:
SET @i = 0;SELECT @i := @i +1 AS i, B.id, B.internalname FROM B INNER JOIN A ON B.internalname = A.internalname AND A.hx > @i WHERE internalname = 'abc';
Float 问题果然是月经贴啊...
t = 236.123.to_d
s = Time.at(t).utc.strftime("%H:%M:%S.%L")
=> "00:03:56.123"
to_d 是 Rails 的方法,Ruby 里可以用BigDecimal(xx, 15)
库存、订单、产品是三个独立系统的意思是 microservice?数据库也分开的?
域名居然不是 dasouche
一言不合就重构!
为什么不用 github,很久之前有回复了:
No. Never. Github is proprietary communications tool which requires
users to accept a terms of service and login. That gives power and
influence to a single entity (and a for-profit organization at that).
Contributing to unicorn is *socially* as easy as contributing to git or
the Linux kernel. There is no need to signup for anything, no need to
ever touch a bloated web browser.
The reason I contribute to Free Software is because I am against any
sort of lock-in or proprietary features. It absolutely sickens me to
encounter users who seem to be incapable of using git without a
proprietary communications tool.
https://www.reddit.com/r/ruby/comments/2cdks1/eric_wong_on_why_unicorn_will_not_be_hosted_on/
stringer 是 sinatra 的
Order.includes(:user => :campany)
#5 楼 @nouse 可以理解为 FDW 其实是 ETL 的一种途径,如果你的 Destination 恰好是 Pg,并且你需要整合的资源都有对应的 FDW Wapper,那么 FDW 确实是最简单的方式。
但我觉得像上面图中想用 FDW 替代 ETL 的想法在目前根本行不通,原因是:
A foreign table can be used in queries just like a normal table, but a foreign table has no storage in the PostgreSQL server.
FDW 的数据其实仍然存储在外部服务器,Pg 服务器只存储 schema,并且提供查询接口。而 ETL 是真的把数据搬 Pg 里面。FDW 和 ETL 在这点上的区别就像 View 之于 Materialized View。而 View 虽然和普通表有着相同的接口,但由于数据存储的限制,性能是一个致命问题。同样,FDW 的最大问题也是性能问题。
Citusdata 做过一个测试:
结论是:
the primary benefit of foreign tables is their flexibility. With them, you can issue complex SQL queries on log files, JSON data, or MySQL. In fact, you can even join data from different sources without having to load any of it.
https://www.citusdata.com/blog/50-postgresql-foreign-file-performance