tiluo 最近的时间轴更新
tiluo

tiluo

V2EX 第 412485 号会员,加入于 2019-05-15 12:15:15 +08:00
tiluo 最近回复了
2020-03-26 04:04:45 +08:00
回复了 v2hh 创建的主题 MySQL 有偿求教数据库结构设计
这个帖子关于时间段的思路还不错
https://segmentfault.com/q/1010000016159952

以下内容为复制粘贴:
一个店铺的营业时间段一般不会超过三个,所以可以有三个字段来存时间段

店铺 table
id, name, duration_id1, duration_id2 (可空), duration_id3 (可空)
然后时间段的表设计:

时间段 table
id, start_time, end_time
店铺表的 duration_id 是时间段表的外键。
时间段表相当于是 reference data,而店铺表的数据是会更改的。
2019-06-23 01:14:57 +08:00
回复了 moodasmood 创建的主题 程序员 图片找点算法优化
请问你确定性能问题是因为算法吗?理论上来说,你的算法需要做 m*n*len(s)次操作,大概是这样 1920*1080*10*6=124,416,000 ‬. 如果是 in memory 的话,不需要 14-20s 吧?感觉上应该只需要 1s 不到
https://blog.csdn.net/yangchenju/article/details/84306840
2019-06-15 22:24:03 +08:00
回复了 sjmcefc2 创建的主题 程序员 请教 postgres 的 copy 问题
为什么无法导入呢,格式问题的话试一试 NULL option
NULL
Specifies the string that represents a null value. The default is \N (backslash-N) in text format, and an unquoted empty string in CSV format. You might prefer an empty string even in text format for cases where you don't want to distinguish nulls from empty strings. This option is not allowed when using binary format.
FORCE_NOT_NULL
Do not match the specified columns' values against the null string. In the default case where the null string is empty, this means that empty values will be read as zero-length strings rather than nulls, even when they are not quoted. This option is allowed only in COPY FROM, and only when using CSV format.
FORCE_NULL
Match the specified columns' values against the null string, even if it has been quoted, and if a match is found set the value to NULL. In the default case where the null string is empty, this converts a quoted empty string into NULL. This option is allowed only in COPY FROM, and only when using CSV format.
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2902 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 02:53 · PVG 10:53 · LAX 18:53 · JFK 21:53
Developed with CodeLauncher
♥ Do have faith in what you're doing.