Hello Everyone,
I am looking at a potential integration between a hosted FMP solution (FMS18, MacOS) and an Oracle DB (version TBD).
Some background:
The integration will not be writing to the Oracle DB; It is a read-only (from Oracle) situation.
The number of tables will be small -- perhaps two or three tables.
At this time, I do not have a sense of the number of records, or the rate of growth.
Options that I am aware of:
- Plug-in: MBS
- Plug-in: 360WorksJDBC
- The use of a microservice that can allow FMP/FMS to query via Insert From URL
- FileMaker ESS with the Import Records and Execute SQL script steps
- FileMaker ESS which allows for table occurrences on the relationship graph which shadow SQL tables
I'd like for this post to be a dialog about these last two options, the ESS options.
- ESS feels like an old and somewhat marginalized technology.
- It also seems to have earned a reputation for not scaling well to large DB situations.
If anyone can speak to experiences with using ESS, I'd like to invite you to weigh in with what you have learned about it.
--- I will start the ball rolling with lessons from my own experiences: ---
My learned list of points for getting the best performance out of an ESS setup, all of which relate to TO's on the graph:
-
Strive to keep the structures flat.
-
Strive to keep the relationships simple.
-
Avoid Refresh Window, flush cache external, as it means that records will have to be pulled down again that might have otherwise been available.
-
Try to limit searching to Finds that match exactly to key values.
-
Avoid doing a basic Find in a text field without ==, because the SQL DB will be forced to return lots of records across the network so that FMP can then post-process them to do a FMP-style of matching.
-
If find criteria must involve some kind of FMP-style string matching (ii.e not just "equals", but "contains", as well), look for a way to involve any other constraint that meets an exact criteria, do that find first -- then constrain using the more costly constraint. This is because ESS won't automatically make such considerations for optimizing the query, and so we must impose the optimization ourself.
-
Using Perform Script on Server is not necessarily the advantage that it normally is with non-ESS, because each request starts with a fresh/empty cache.
-
When performing a find, enter Find mode before navigating to the target layout/context. We already have made a practice for this with regular FMP tables to prevent unnecessary downloading of record data, but apparently the overhead savings with ESS is far more dramatic.
Credit:
Credit for reviewing the above list, adding the point about entering Find mode before layout navigation, and being very generous with sharing his knowledge of ESS goes to a long-time FMP dev community contributor Lee Snover, who graciously shared his insights when I asked him about this topic. (Thank you!)
One particular question that I have:
Nearly all (if not all) of the above tips are geared towards requiring the least amount of data to transfer from the SQL source to FMP. I think that anyone who has worked in an ESS environment has probably had the experience where suddenly there is a dramatic slow-down while a large amount of table data is being downloaded from SQL to FMP. I'd like to think that by following the points above, that such experiences could be minimized.
It seems likely that there is a varied list of circumstances which will cause the ESS connection to refresh and result in a massive download of data. I'd be interested in learning any insights others have regarding whether some such refresh circumstances are beyond our control as developers, or whether they are mostly avoidable per tips such as the above.
Lastly:
Posting this request isn't to mean that I am sold on ESS, and am heading in that direction. This post is mostly because ESS feels like the biggest unknown of all the options that I have in front of me, and so if I can tap into the wisdom of everyone here, I stand a much better chance of seeing it clearly.
Thanks everyone -- especially long post, I know. Thanks for making it to the end.
-Steve