Ruby China
  • 社区
  • 招聘
  • Wiki
  • 酷站
  • Gems
  • 注册
  • 登录
Hooopo
@hooopo
管理员
第 8 位会员 / 2011-10-28

[email protected]
nil
北京
160 篇帖子 / 3013 条回帖
360 关注者
0 正在关注
74 收藏
聪明的妖怪录下了唐僧的紧箍咒
打赏作者
GitHub Public Repos
  • oh-my-github-circles 47

    GitHub User Circle Generator Using GitHub Actions

  • hackernews-insight 21

    Hackernews Insight using TiDB Cloud

  • repo-track-pipeline 6

    🔄 A flexible open-source data pipeline for seamlessly syncing data from any repository to your da...

  • oh-my-github-pipeline 6

    🔄 A flexible open-source data pipeline for seamlessly syncing data from any github user to your d...

  • chatgpt-xiaoai 3

    小爱音箱集成LLM,SaaS 服务

  • repo-contributor-circles 1

    GitHub repo contributor circles generator.

  • ossinsight-x 1

    Automatically post trending repos to Twitter every day.

  • mi-service 1

    XiaoMi Cloud Service for mi.com

  • hooopo 0

  • streamlit-echarts-demo 0

    Demo for Streamlit ECharts component

More on GitHub
  • 概况
  • 话题
  • 回帖
  • 收藏
  • 正在关注
  • 关注者
  • 为什么 PostgreSQL 所有会话都在等待磁盘读操作,导致所有 sql 都无法响应? at 2021年06月28日

    只有这监控?

  • 做了一个把 Chia Network 链上数据导入图数据库的工具 at 2021年05月28日

    不错

  • 我照着 collectiveidea/audited 改了一套 mongoid 版 at 2021年05月27日

    2021 年了,还有人用 mongodb?

  • 大家有没有留意过 Kernel::require 这个 API 的性能问题 at 2021年05月20日

    只影响第一次加载?

  • 请问出现这个 A LoadError occurred in #:这种类似问题怎么解决?(不讨论与话题无关的东西) at 2021年05月19日

    我信了!你重启一下试试

  • RubyConf China 2021 Hotwire 讲师征集 at 2021年05月17日

    Hotwire™

  • 记录一下 dashboard 性能优化 (10s->1ms) at 2021年05月13日

    如果你的返回结果集已经很少了就没必要用这种方法了。你直接 count 也不会慢到哪里去。这种场景是查返回值会很大的那种 count 的

  • 记录一下 dashboard 性能优化 (10s->1ms) at 2021年05月13日

    7000w?误差多少?

  • 记录一下 dashboard 性能优化 (10s->1ms) at 2021年05月13日

    不需要 select count(*),直接用 select *

  • 最近 Basecamp 的瓜有人在吃么? at 2021年05月03日

    只要 basecamp 还赚钱就问题不大,以 dhh 的影响力招人应该不成问题

  • Elixir 进展和学习 at 2021年04月30日

    为什么是 php

  • 为这个世界操碎了心 at 2021年04月30日

    好久没这么热闹了,开心,撒花! +1

  • Getting Started with Rails & TiDB at 2021年04月22日

    好吧

  • Getting Started with Rails & TiDB at 2021年04月22日

    我对 TiFlash 感兴趣,打算来试试分析类场景的应用。

  • 记录一下 dashboard 性能优化 (10s->1ms) at 2021年04月16日

    一定不完全准确,但只要你的 vacuum 执行正常,我观察下来,表越大误差越低。

  • 记录一下 dashboard 性能优化 (10s->1ms) at 2021年04月13日

    一个小时的误差还真赶不上这种,有了新的过滤条件还要维护,在索引里的一般误差不是很大,这种方案的前提是表大并且更新频繁,auto vacuum 就会运行的频率高,数据也就准了

  • GraphQL VS RESTful,大佬们上 GraphQL 了吗? at 2021年04月13日
    • 1 减少请求数据是在多端情况去比的
    • 2 落地页这种 gql 也不会一个请求返回所有数据,你也可以像普通 api 接口一样,为落地页单独做几个接口
    • 4 这个绝对是 gql 的优点,你普通 api 接口删了返回字段就不报错吗,gql 是可以直接 detect 出 break change 的

    摆脱 UI 驱动是 GQL 的一个优势,普通接口你需要先有页面设计,再开发接口。GQL 的话,你完全可以根据 DB、Model 直接自省出 Type,写出接口。少部分页面比如 landing page 之类,才需要和前端去沟通格式。想省时间吃饭 GQL 还真管用。

    之前的一个自动化的实践:

    • 数据库字段加 comment
    • rake 从 rails model 生成 graphql type 自动读取数据库字段注释
    • graphiql/graphql doc
    • 自动 break change 通知

  • 记录一下 dashboard 性能优化 (10s->1ms) at 2021年04月13日

    这个是表记录条数,不能加条件的,实际就没什么用了。

  • 记录一下 dashboard 性能优化 (10s->1ms) at 2021年04月12日

    快如⚡

  • ROOM.CAFE has been open source under the MIT at 2021年04月09日

    cool

  • 谈谈 Rails 中的分页 - 进阶版 at 2021年04月08日

    这种方法很通用,几乎解决了我遇到了所有复杂拼接问题

  • 谈谈 Rails 中的分页 - 进阶版 at 2021年04月07日

    感觉不需要 find by sql 的

    user = User.find(x)
    done_products = user.evaluations.where(xx).select(:product_id)
    Product.select("products.*").joins("JOIN (#{done_products.to_sql}) AS dp ON dp.producct_id = products.id").where(xx).page(xx)
    
    Product.select("products.*").joins("LEFT JOIN (#{done_products.to_sql}) AS dp ON dp.producct_id = products.id").where("dp.product_id is null").page(xx)
    

    这篇文章首先提出一种稍微复杂的查询场景,在这种场景下,Rails 提供的查询方法已经无法轻易地组装查询逻辑,这个时候用原生的 SQL 语句反而简单许多。

    这个例子还有点简单,但结论我觉得恰恰是 Rails 查询封装结合 SQL 的方式在解决复杂过滤和分页需求更适合。

  • Crystal 1.0.0 Released! at 2021年04月03日

    心动了

  • 没网怎么更新服务器上的代码 at 2021年04月02日

    u 盘

  • 谈谈 Rails 中的分页 - 简易版 at 2021年03月31日

    pagy

  • Rails 因為 mimemagic 炸了 at 2021年03月27日

    Have a great day!

  • Rails 因為 mimemagic 炸了 at 2021年03月26日

    又炸了

  • Hypercable Analytics open sourced at 2021年03月26日

    补个图

  • Rails 因為 mimemagic 炸了 at 2021年03月25日

    magic

  • 上一页
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • …
  • 108
  • 109
  • 下一页
关于 / RubyConf / Ruby 镜像 / RubyGems 镜像 / 活跃会员 / 组织 / API / 贡献者
由众多爱好者共同维护的 Ruby 中文社区,本站使用 Homeland 构建,并采用 Docker 部署。
服务器由 赞助 CDN 由 赞助
iOS 客户端 / Android 客户端 简体中文 / English