AnsweredAssumed Answered

Import Records step cause redundant SELECTs

Question asked by eworbit on Dec 14, 2016
Latest reply on Dec 15, 2016 by eworbit

Why does this happen?


The SELECT statement in the Import Records script step is as simply as is can be. I use SQL Server Profiler to secretly watch FileMaker Server's incoming SELECT statements - just to see what FMS is doing under the hood.


See attached screenshot.  It's the 3rd request is what I believe that coincides with the FM record import progress dialog.   The first two requests are the real mystery. 


My guess is that FM wants to either get a column count, test connectivity or get a data sampling before the important 3rd SELECT happens.   But there are not LIMIT clauses on the first two SELECTs.   They're all the same.   FMS might be "canceling" the first two SELECT statements and move on to the third.


This is okay for big imports and most FM developers are probably unaware this is happening.   It is a problem, though, when you just want to import a few rows (like an order's line items) which should take 2 seconds - but you end up paying 6 seconds or more - triple the cost!


This at least happens on Mac FMS 14 and 15 with the Actual Technologies ODBC driver.   I don't know if FMS for Windows does this.


I don't think there is a developer community solution to this.  I just wanted to see if anyone else was aware of this inefficiency.

-Eric Wood