Filemaker:让大数据查询更高效
好的,我有一个发货主表和一个单独的费用表。每个记录都有数百万条记录,并且它是从旧系统进入 Filemaker 的,因此所有字段都定义为文本,即使它们可能是日期、数字等。
费用表中有一个日期字段。我想创建一个数字字段来表示年份。我可以使用 Middle 函数来解析该字段并仅获取计算字段中的年份。但是,将年份作为文字数字字段不是更快吗,尤其是因为我要进行过滤和排序?那么如何将这个计算转化为它的值呢?我尝试将“计算”字段更改为“数字”,但它只是呈现空白。
OK I have a Master Table of shipments, and a separate Charges table. There are millions of records in each, and it's come into Filemaker from a legacy system, so all the fields are defined as Text even though they may be Date, Number, etc.
There's a date field in the charges table. I want to create a number field to represent just the year. I can use the Middle function to parse the field and get just the year in a Calculation field. But wouldn't it be faster to have the year as a literal number field, especially since I'm going to be filtering and sorting? So how do I turn this calculation into its value? I've tried just changing the Calculation field to Number, but it just renders blanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您的计算有问题,它不应该仅仅因为字段类型不同而变成空白。即:
只要计算结果设置为 Number,就足够了。您也可以将其包装到 GetAsNumber(...) 中,但实际上,只要字段类型正确,就没有区别。
如果您有 FM Advanced,请尝试在数据查看器(工具 -> 数据查看器)中设置计算,而不是在定义字段中,这样会更快,一旦您喜欢结果,您可以将其传输到字段或进行替换。但是,从搜索/排序的角度来看,(存储的)计算和常规字段之间没有区别,因此替换毫无意义,实际上更危险,因为无法撤消错误的替换。
There's something wrong with your calculation, it should not turn blank just because field type is different. I.e.:
should suffice, provided the calc result is set to Number. You may also wrap it into GetAsNumber(...), but, really, there's no difference as long as field type is right.
If you have FM Advanced, try to set up your calc in the Data Viewer (Tools -> Data Viewer) rather than in Define Fields, this would be faster and, once you like the result, you can transfer it into a field or make a replace. But, from the searching/sorting standpoint there's no difference between a (stored) calculation and a regular field, so replacing is pointless and, actually, more dangerous, as there's no way to undo a wrong replace.
这就是我一直在寻找的东西,来自
http: //help.filemaker.com/app/answers/detail/a_id/3366/~/converting-unstored-calculation-fields-to-store-data
:
Here's what i was looking for, from
http://help.filemaker.com/app/answers/detail/a_id/3366/~/converting-unstored-calculation-fields-to-store-data
:
并不是要贬低 FileMaker,但数百万条记录意味着 FileMaker 可能是错误的选择。你的系统会很慢,很慢,很慢。 FileMaker 非常适合工作组,而且没有办法更快地开发数据库应用程序。但 FileMaker 不擅长的一件事是处理大量记录。
顺便说一句,米哈伊尔·埃多辛 (Mikhail Edoshin) 说得完全正确。
Not dissing FileMaker at all, but millions of records means FileMaker is probably the wrong choice here. Your system will be slow, slow, slow. FileMaker is great for workgroups and there is no way to develop a database app faster. But one thing FileMaker is not good at is handling huge numbers of records.
BTW, Mikhail Edoshin is exactly right.