Plex partial scanning is extremely slow to start on large libraries

Running the Plex Scanner against a single folder (partial scan) it is doing some database operation before scanning which exponentially are getting worse by library size.

Jun 05, 2019 13:53:54.297 [7208] INFO - Plex Media Scanner v1.15.8.1163-005053bb5 - Microsoft PC x64 - build: windows-x86 - GMT 02:00
Jun 05, 2019 13:53:54.297 [7208] INFO - Windows version: 6.2 (Build 9200), language en-US
Jun 05, 2019 13:53:54.297 [7208] INFO - 8 3696 MHz processor(s): Architecture=0, Level=6, Revision=40458 Processor Identifier=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
Jun 05, 2019 13:53:54.297 [7208] DEBUG - "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe"  --scan --refresh --section 3 --directory "\\NAS\MOVIES-M\The Matrix (1999) [tt0133093]"
************* WHAT IS GOING ON HERE V *************
Jun 05, 2019 13:53:54.299 [6148] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Jun 05, 2019 13:53:54.489 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 13:57:33.426 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
Jun 05, 2019 14:01:33.062 [6148] DEBUG - It took 125.000000 ms to retrieve 23253 items.
Jun 05, 2019 14:05:52.557 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 14:09:53.709 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
Jun 05, 2019 14:13:52.505 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 14:17:57.726 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 14:22:11.943 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 14:26:23.551 [6148] DEBUG - It took 125.000000 ms to retrieve 23253 items.
Jun 05, 2019 14:30:30.281 [6148] DEBUG - It took 125.000000 ms to retrieve 23253 items.
Jun 05, 2019 14:32:59.474 [6148] DEBUG - It took 62.500000 ms to retrieve 0 items.
Jun 05, 2019 14:34:35.403 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
Jun 05, 2019 14:38:34.688 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 14:42:34.622 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
Jun 05, 2019 14:46:35.526 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 14:50:39.116 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 14:54:37.884 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
Jun 05, 2019 14:58:40.907 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 15:02:37.957 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 15:06:35.652 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
Jun 05, 2019 15:10:31.745 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 15:14:25.149 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 15:18:19.199 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
Jun 05, 2019 15:22:14.892 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
Jun 05, 2019 15:26:10.792 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
Jun 05, 2019 15:30:04.329 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 15:33:58.153 [6148] DEBUG - It took 109.375000 ms to retrieve 23253 items.
Jun 05, 2019 15:37:54.034 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
Jun 05, 2019 15:41:50.461 [6148] DEBUG - It took 93.750000 ms to retrieve 23253 items.
************* WHAT IS GOING ON HERE ^ *************
Jun 05, 2019 15:45:42.696 [6148] DEBUG - Scanning Movies using en(Plex Movie Scanner) with 1 current media items and 1 section locations in the database...
Jun 05, 2019 15:45:42.696 [2120] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=3&sinceTime=1559741142
Jun 05, 2019 15:45:42.696 [2120] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=3&sinceTime=1559741142
Jun 05, 2019 15:45:42.758 [6148] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Jun 05, 2019 15:45:42.758 [6148] DEBUG -   * Scanning \\NAS\MOVIES-M\The Matrix (1999) [tt0133093]
Jun 05, 2019 15:45:42.758 [6148] DEBUG -     * Scanning directory \\NAS\MOVIES-M\The Matrix (1999) [tt0133093] (parent: yes)
Jun 05, 2019 15:45:42.758 [6148] VERBOSE -     * Noting that 'The Matrix (1999) [tt0133093]' was updated at 2018-12-20 18:39:00
Jun 05, 2019 15:45:42.758 [6148] VERBOSE -     * Taking directory 'The Matrix (1999) [tt0133093]' (55285) out of the map (0 left)
Jun 05, 2019 15:45:42.758 [6148] DEBUG - Adding file for scanner: "\\NAS\MOVIES-M\The Matrix (1999) [tt0133093]\The.Matrix.1999.REMASTERED.1080p.Bluray.Proper.x264.AAC.5.1-RARBG.mp4"
Jun 05, 2019 15:45:42.961 [6148] DEBUG - Skipping over directory 'The Matrix (1999) [tt0133093]', as nothing has changed; removing 1 media items from map.
Jun 05, 2019 15:45:42.961 [2120] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20The%20Matrix%20(1999)%20[tt0133093]
Jun 05, 2019 15:45:42.961 [6148] DEBUG - Removing 0 media items that were left.
Jun 05, 2019 15:45:42.961 [6148] DEBUG - Removing 0 directories that were left.
Jun 05, 2019 15:45:42.977 [2120] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20The%20Matrix%20(1999)%20[tt0133093]
Jun 05, 2019 15:45:43.024 [6148] DEBUG - Refreshing section 3 of type: 1
Jun 05, 2019 15:45:43.086 [6892] DEBUG - Refreshing 0 IDs.

Version 1.15.8.1163
Windows 2019 Server Standard 64-bit
Intel i7-8700K
32 GB RAM
Samsung 850 PRO SSD
Nothing running (even plex), only plex scanner
Database is optimized and checked for corruption.
Database size: 900MB
Media is stored on Synology DS3612xs.
Both server and NAS is connected with wired gigabit network.

Partial scan of a single directory in library 3 (Directory has 1 item, library has 23000 items:
“C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe” --scan --refresh --section 3 --directory “\\NAS\MOVIES-M\The Matrix (1999) [tt0133093]”

Takes 1,5 hour
Single CPU core is stuck to 100% during this prosses.
No memory, Disk IO or network activity to speak off.
Log: https://pastebin.com/11ZpPuGq

Full scan of library 3 (Library has 23000 items:
“C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe” --scan --refresh --section 3

Takes 1 hour, so less than a partial scan??
No CPU,memory, Disk IO or network activity to speak off.
Logs: https://ufile.io/25ej3ipy
https://ufile.io/jevrc9to
https://ufile.io/vjkno3cw
https://ufile.io/85femqpw
https://ufile.io/dgfklx1t
https://ufile.io/wmtc1qz4

Partial scan of a single directory in library 5 (Directory has 1 item, library has 250 items:
“C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe” --scan --refresh --section 5 --directory “\\NAS\MOVIES3D-T\Terminator 2 - Judgment Day (1991) [tt0103064]”

Takes 90 seconds
1 minute delay before actual scanning starts
Log: https://pastebin.com/2fc6P5Xt

Do you have Tautulli running (or other 3rd-party scripts with access to the database)?

I do run Tautulli from another server. However all the tests been run with the scanner from cmd. Plex server is turn off/not running, to exclude any interference from that. Therefore, the API should not be available for Tautulli. I will rerun the test with Tautulli turned off just to be sure though.

Same issue with Tautulli shut down, optimized the db and verified integrity:

Jun 06, 2019 08:39:43.184 [3564] INFO - Plex Media Scanner v1.15.8.1163-005053bb5 - Microsoft PC x64 - build: windows-x86 - GMT 02:00
Jun 06, 2019 08:39:43.184 [3564] INFO - Windows version: 6.2 (Build 9200), language en-US
Jun 06, 2019 08:39:43.184 [3564] INFO - 8 3696 MHz processor(s): Architecture=0, Level=6, Revision=40458 Processor Identifier=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
Jun 06, 2019 08:39:43.184 [3564] DEBUG - "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe"  --scan --refresh --section 3 --directory "\\NAS\MOVIES-M\The Matrix (1999) [tt0133093]"
Jun 06, 2019 08:39:43.184 [5444] VERBOSE - [FFMPEG] - Rescanning for external libs: 'C\:\\Users\\aj\\AppData\\Local\\Plex\ Media\ Server\\Codecs\\392df4f-2292-windows-x86\\'
Jun 06, 2019 08:39:43.184 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\aac_decoder.dll
Jun 06, 2019 08:39:43.184 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\ac3_decoder.dll
Jun 06, 2019 08:39:43.185 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\dca_decoder.dll
Jun 06, 2019 08:39:43.185 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\h264_decoder.dll
Jun 06, 2019 08:39:43.186 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\hevc_decoder.dll
Jun 06, 2019 08:39:43.186 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\libx264_encoder.dll
Jun 06, 2019 08:39:43.187 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg1video_decoder.dll
Jun 06, 2019 08:39:43.187 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg2video_decoder.dll
Jun 06, 2019 08:39:43.187 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg4_decoder.dll
Jun 06, 2019 08:39:43.188 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\msmpeg4v1_decoder.dll
Jun 06, 2019 08:39:43.188 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\msmpeg4v3_decoder.dll
Jun 06, 2019 08:39:43.188 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\vc1_decoder.dll
Jun 06, 2019 08:39:43.189 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\vp9_decoder.dll
Jun 06, 2019 08:39:43.189 [5444] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\wmv3_decoder.dll
Jun 06, 2019 08:39:43.189 [5444] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Jun 06, 2019 08:39:43.394 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 08:43:34.936 [5444] DEBUG - It took 125.000000 ms to retrieve 23291 items.
Jun 06, 2019 08:47:00.540 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 08:50:31.088 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 08:54:02.482 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 08:57:34.097 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 09:01:05.383 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 09:04:35.607 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 09:08:02.206 [5444] DEBUG - It took 125.000000 ms to retrieve 23291 items.
Jun 06, 2019 09:11:31.187 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 09:14:58.339 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 09:18:25.177 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 09:21:53.621 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 09:25:20.121 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 09:28:47.966 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 09:30:45.520 [5444] DEBUG - It took 62.500000 ms to retrieve 0 items.
Jun 06, 2019 09:32:16.750 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 09:35:45.763 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 09:39:12.544 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 09:42:40.353 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 09:46:11.898 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 09:49:43.138 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 09:53:17.523 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 09:56:49.887 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 10:00:18.960 [5444] DEBUG - It took 93.750000 ms to retrieve 23291 items.
Jun 06, 2019 10:03:55.786 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 10:07:31.047 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 10:11:03.971 [5444] DEBUG - It took 109.375000 ms to retrieve 23291 items.
Jun 06, 2019 10:14:39.463 [5444] DEBUG - It took 125.000000 ms to retrieve 23291 items.
Jun 06, 2019 10:18:11.161 [5444] DEBUG - Scanning Movies using en(Plex Movie Scanner) with 1 current media items and 1 section locations in the database...
Jun 06, 2019 10:18:11.162 [8000] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=3&sinceTime=1559807891
Jun 06, 2019 10:18:11.211 [5444] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Jun 06, 2019 10:18:11.211 [5444] DEBUG -   * Scanning \\NAS\MOVIES-M\The Matrix (1999) [tt0133093]
Jun 06, 2019 10:18:11.224 [5444] DEBUG -     * Scanning directory \\NAS\MOVIES-M\The Matrix (1999) [tt0133093] (parent: yes)
Jun 06, 2019 10:18:11.224 [5444] VERBOSE -     * Noting that 'The Matrix (1999) [tt0133093]' was updated at 2018-12-20 18:39:00
Jun 06, 2019 10:18:11.224 [5444] VERBOSE -     * Taking directory 'The Matrix (1999) [tt0133093]' (55285) out of the map (0 left)
Jun 06, 2019 10:18:11.226 [5444] DEBUG - Adding file for scanner: "\\NAS\MOVIES-M\The Matrix (1999) [tt0133093]\The.Matrix.1999.REMASTERED.1080p.Bluray.Proper.x264.AAC.5.1-RARBG.mp4"
Jun 06, 2019 10:18:11.440 [5444] DEBUG - Skipping over directory 'The Matrix (1999) [tt0133093]', as nothing has changed; removing 1 media items from map.
Jun 06, 2019 10:18:11.450 [5444] DEBUG - Removing 0 media items that were left.
Jun 06, 2019 10:18:11.450 [5444] DEBUG - Removing 0 directories that were left.
Jun 06, 2019 10:18:11.501 [5444] DEBUG - Refreshing section 3 of type: 1
Jun 06, 2019 10:18:11.556 [5820] DEBUG - Refreshing 0 IDs.
Jun 06, 2019 10:18:12.363 [8000] ERROR - Error issuing curl_easy_perform(handle): 7
Jun 06, 2019 10:18:12.363 [8000] WARN - HTTP error requesting GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=3&sinceTime=1559807891 (0, No error) (Failed to connect to 127.0.0.1 port 32400: Connection refused)
Jun 06, 2019 10:18:12.363 [8000] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20The%20Matrix%20(1999)%20[tt0133093]
Jun 06, 2019 10:18:13.565 [8000] ERROR - Error issuing curl_easy_perform(handle): 7
Jun 06, 2019 10:18:13.565 [8000] WARN - HTTP error requesting GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20The%20Matrix%20(1999)%20[tt0133093] (0, No error) (Failed to connect to 127.0.0.1 port 32400: Connection refused)

Running the same, just without a directory set, you can see the scanner start immediately:

Jun 06, 2019 10:22:58.114 [6408] INFO - Plex Media Scanner v1.15.8.1163-005053bb5 - Microsoft PC x64 - build: windows-x86 - GMT 02:00
Jun 06, 2019 10:22:58.115 [6408] INFO - Windows version: 6.2 (Build 9200), language en-US
Jun 06, 2019 10:22:58.115 [6408] INFO - 8 3696 MHz processor(s): Architecture=0, Level=6, Revision=40458 Processor Identifier=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
Jun 06, 2019 10:22:58.115 [6408] DEBUG - "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe"  --scan --refresh --section 3
Jun 06, 2019 10:22:58.114 [4216] VERBOSE - [FFMPEG] - Rescanning for external libs: 'C\:\\Users\\aj\\AppData\\Local\\Plex\ Media\ Server\\Codecs\\392df4f-2292-windows-x86\\'
Jun 06, 2019 10:22:58.114 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\aac_decoder.dll
Jun 06, 2019 10:22:58.115 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\ac3_decoder.dll
Jun 06, 2019 10:22:58.115 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\dca_decoder.dll
Jun 06, 2019 10:22:58.115 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\h264_decoder.dll
Jun 06, 2019 10:22:58.116 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\hevc_decoder.dll
Jun 06, 2019 10:22:58.116 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\libx264_encoder.dll
Jun 06, 2019 10:22:58.117 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg1video_decoder.dll
Jun 06, 2019 10:22:58.117 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg2video_decoder.dll
Jun 06, 2019 10:22:58.117 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg4_decoder.dll
Jun 06, 2019 10:22:58.118 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\msmpeg4v1_decoder.dll
Jun 06, 2019 10:22:58.118 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\msmpeg4v3_decoder.dll
Jun 06, 2019 10:22:58.118 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\vc1_decoder.dll
Jun 06, 2019 10:22:58.119 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\vp9_decoder.dll
Jun 06, 2019 10:22:58.119 [4216] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\wmv3_decoder.dll
Jun 06, 2019 10:22:58.119 [4216] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Jun 06, 2019 10:22:58.121 [4216] INFO - SQLITE3:0xa6a9d160, 283, recovered 1 frames from WAL file C:\Users\aj\AppData\Local\Plex Media Server\Plug-in Support\Databases\com.plexapp.plugins.library.db-wal
Jun 06, 2019 10:22:58.263 [4216] DEBUG - Scanning Movies using en(Plex Movie Scanner) with 23286 current media items and 28 section locations in the database...
Jun 06, 2019 10:22:58.263 [3096] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=3&sinceTime=1559808178
Jun 06, 2019 10:22:58.322 [4216] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Jun 06, 2019 10:22:58.322 [4216] DEBUG -   * Scanning \\NAS\MOVIES\Root
Jun 06, 2019 10:22:58.433 [4216] DEBUG -     * Scanning directory \\NAS\MOVIES\Root (parent: no)
Jun 06, 2019 10:22:58.434 [4216] VERBOSE -     * Noting that '' was updated at 2019-05-30 14:57:54
Jun 06, 2019 10:22:58.434 [4216] VERBOSE -     * Taking directory '' (3) out of the map (23291 left)
Jun 06, 2019 10:22:58.435 [4216] DEBUG - Adding file for scanner: "\\NAS\MOVIES\Root\protect"
Jun 06, 2019 10:22:58.438 [4216] DEBUG - Skipping over directory '', as nothing has changed; removing 0 media items from map.
Jun 06, 2019 10:22:58.443 [4216] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Jun 06, 2019 10:22:58.443 [4216] DEBUG -   * Scanning \\NAS\MOVIES-0
Jun 06, 2019 10:22:58.452 [4216] DEBUG -     * Scanning directory \\NAS\MOVIES-0 (parent: no)
Jun 06, 2019 10:22:58.453 [4216] VERBOSE -     * Noting that '' was updated at 2019-06-05 14:25:53
Jun 06, 2019 10:22:58.453 [4216] VERBOSE -     * Taking directory '' (3) out of the map (23291 left)
Jun 06, 2019 10:22:58.467 [4216] DEBUG - Adding subdirectory for scanner: "\\NAS\MOVIES-0\#1 Cheerleader Camp (2010) [tt1637976]"
Jun 06, 2019 10:22:58.467 [4216] DEBUG - Adding subdirectory for scanner: "\\NAS\MOVIES-0\$5 a Day (2008) [tt1024733]"
Jun 06, 2019 10:22:58.467 [4216] DEBUG - Adding subdirectory for scanner: "\\NAS\MOVIES-0\'71 (2014) [tt2614684]"
Jun 06, 2019 10:22:58.467 [4216] DEBUG - Adding subdirectory for scanner: "\\NAS\MOVIES-0\(500) Days of Summer (2009) [tt1022603]"
Jun 06, 2019 10:22:58.468 [4216] DEBUG - Adding subdirectory for scanner: "\\NAS\MOVIES-0\001 Trolling (2017) [tt4602074]"
Jun 06, 2019 10:22:58.468 [4216] DEBUG - Adding subdirectory for scanner: "\\NAS\MOVIES-0\1 Buck (2017) [tt4685428]"

For clairification I’m getting the same delay on other large libraries and folders as well. Not just the ones used in these tests.

Another idea: which version of the SMB/CIFS protocol did you enable on your NAS?
I seem to remember that there were performance issues with the SMB3 protocol. Or was it the combination of SMB1 and SMB3?
I don’t remember exactly. I’d try changing the relevant preference on the NAS.

It is running SMB3

PS C:\Windows\system32> Get-SmbConnection

ServerName ShareName UserName Credential Dialect NumOpens
---------- --------- -------- ---------- ------- --------
NAS        movies    PLEX\aj  PLEX\aj    3.1.1   2
NAS        MOVIES-C  PLEX\aj  PLEX\aj    3.1.1   2

I’m do not have any issues during normal playback, transcoding or when I do a full scan, analyze or deep analyze files. Only during a partial scan which includes the --directory parameter. Which leads to believe this is related to this specific parameter for the scanner and/or something database related.

The issue is just this big delay before it starts, when it has started its scans “quickly”. Unfortunately there is no more verbose information in the logs about what it does during this delay/time. And any disk and network trace I’ve done does not yield any results about what the scanner is doing.

Have you tried to demote it to SMB 2?

Looks like its the same issue with SMB2:

PS C:\Windows\system32> Get-SmbConnection

ServerName ShareName UserName Credential Dialect NumOpens
---------- --------- -------- ---------- ------- --------
NAS        IPC$      PLEX\aj  PLEX\aj    2.0.2   0
NAS        MOVIES-M  PLEX\aj  PLEX\aj    2.0.2   3
Jun 06, 2019 11:01:32.171 [7652] INFO - Plex Media Scanner v1.15.8.1163-005053bb5 - Microsoft PC x64 - build: windows-x86 - GMT 02:00
Jun 06, 2019 11:01:32.171 [7652] INFO - Windows version: 6.2 (Build 9200), language en-US
Jun 06, 2019 11:01:32.171 [7652] INFO - 8 3696 MHz processor(s): Architecture=0, Level=6, Revision=40458 Processor Identifier=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
Jun 06, 2019 11:01:32.171 [7652] DEBUG - "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe"  --scan --refresh --section 3 --directory "\\NAS\MOVIES-M\The Matrix (1999) [tt0133093]"
Jun 06, 2019 11:01:32.169 [0868] VERBOSE - [FFMPEG] - Rescanning for external libs: 'C\:\\Users\\aj\\AppData\\Local\\Plex\ Media\ Server\\Codecs\\392df4f-2292-windows-x86\\'
Jun 06, 2019 11:01:32.169 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\aac_decoder.dll
Jun 06, 2019 11:01:32.170 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\ac3_decoder.dll
Jun 06, 2019 11:01:32.170 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\dca_decoder.dll
Jun 06, 2019 11:01:32.170 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\h264_decoder.dll
Jun 06, 2019 11:01:32.171 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\hevc_decoder.dll
Jun 06, 2019 11:01:32.171 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\libx264_encoder.dll
Jun 06, 2019 11:01:32.172 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg1video_decoder.dll
Jun 06, 2019 11:01:32.172 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg2video_decoder.dll
Jun 06, 2019 11:01:32.172 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg4_decoder.dll
Jun 06, 2019 11:01:32.173 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\msmpeg4v1_decoder.dll
Jun 06, 2019 11:01:32.173 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\msmpeg4v3_decoder.dll
Jun 06, 2019 11:01:32.173 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\vc1_decoder.dll
Jun 06, 2019 11:01:32.174 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\vp9_decoder.dll
Jun 06, 2019 11:01:32.174 [0868] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\wmv3_decoder.dll
Jun 06, 2019 11:01:32.175 [0868] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Jun 06, 2019 11:01:32.360 [0868] DEBUG - It took 109.375000 ms to retrieve 23292 items.
Jun 06, 2019 11:02:21.579 [0868] DEBUG - It took 62.500000 ms to retrieve 0 items.
Jun 06, 2019 11:04:46.766 [0868] DEBUG - It took 93.750000 ms to retrieve 23292 items.
... i'll let it continue run to confirm 

^ It’s the same; no improvement with SMB2

It looks like this is database related:

During the 10 seconds I let the log keep running it read 2 million database pages.

Does it make a difference if you omit --refresh from the command?

Same issue without --refresh

Also tried a clean VM at work with windows 10, plex 1.15.8.1163. No access to home NAS. Copied the DB to it and ran the same command. Same issue there as well.

Tested diffrent library sizes and it is very much related to how many items are in that library:
1 item = 200ms
250 items = 5min
23000 itemes = 1,5 hour

23286 current media items and 28 section locations

This indicates that you have defined 28 different paths in the library properties, on the ‘Add folders’ tab.
I wonder if it makes a difference if you reduce that number.

I get the intent behind, why you did it. But with movies in Plex, you should be able to use arbitrary subfolders without the penalty of more "mismatches ".
Particularly if you use a subfolder per movie anyway.

May I suggest you test a structure like
\\NAS\Movies\movies\0\#1 Cheerleader Camp (2010) [tt1637976]
where you point Plex’s library only to \\NAS\Movies\movies

The “duplication” in the above example is intentional and crucial. The goal is to point Plex to a folder, and not directly to the root of a file share.
\\NAS is the machine
Movies is the share
movies is the folder on that share

I have to split up the shares this way since I cannot fit everything on a single storage volume. But I will redo one of the smaller libraries just to confirm/deny if this is an issue. It will take some time to rescan though. I’ll get back at soon as its done.

Following… I am seeing the same problem on my servers too…

Ran this from command prompt:
“Plex Media Scanner.exe” --scan --refresh --section 78
Went through the entire section perfectly…

Adding the directory parameter causes it to hang:
“Plex Media Scanner.exe” --scan --refresh --section 78 --directory “\192.168.2.200\Movies_5\2019\Lancaster Skies (2019)”

here is current log - still running…
Jun 06, 2019 09:35:45.013 [0200] INFO - Plex Media Scanner v1.15.6.1079-78232c603 - Microsoft PC x64 - build: windows-x86 - GMT -05:00
Jun 06, 2019 09:35:45.014 [0200] INFO - Windows version: 6.2 (Build 9200), language en-US
Jun 06, 2019 09:35:45.014 [0200] INFO - 6 2800 MHz processor(s): Architecture=0, Level=6, Revision=15876 Processor Identifier=Intel64 Family 6 Model 62 Stepping 4, GenuineIntel
Jun 06, 2019 09:35:45.014 [0200] DEBUG - “Plex Media Scanner.exe” --scan --refresh --section 78 --directory “\192.168.2.200\Movies_5_Red\2019\Lancaster Skies (2019)”
Jun 06, 2019 09:35:45.026 [4160] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Jun 06, 2019 09:35:45.226 [4160] DEBUG - It took 31.250000 ms to retrieve 106 items.
Jun 06, 2019 09:36:10.171 [4160] DEBUG - It took 46.875000 ms to retrieve 127 items.
Jun 06, 2019 09:36:14.280 [4160] DEBUG - It took 15.625000 ms to retrieve 132 items.
Jun 06, 2019 09:36:14.331 [4160] DEBUG - It took 62.500000 ms to retrieve 0 items.
Jun 06, 2019 09:36:18.590 [4160] DEBUG - It took 31.250000 ms to retrieve 131 items.
Jun 06, 2019 09:36:22.854 [4160] DEBUG - It took 0.000000 ms to retrieve 114 items.
Jun 06, 2019 09:36:26.412 [4160] DEBUG - It took 15.625000 ms to retrieve 121 items.
Jun 06, 2019 09:36:35.850 [4160] DEBUG - It took 31.250000 ms to retrieve 125 items.
Jun 06, 2019 09:36:39.879 [4160] DEBUG - It took 31.250000 ms to retrieve 136 items.
Jun 06, 2019 09:36:44.395 [4160] DEBUG - It took 31.250000 ms to retrieve 143 items.
Jun 06, 2019 09:36:48.882 [4160] DEBUG - It took 31.250000 ms to retrieve 163 items.
Jun 06, 2019 09:36:53.892 [4160] DEBUG - It took 31.250000 ms to retrieve 152 items.
Jun 06, 2019 09:36:58.430 [4160] DEBUG - It took 31.250000 ms to retrieve 163 items.
Jun 06, 2019 09:37:03.131 [4160] DEBUG - It took 31.250000 ms to retrieve 172 items.
Jun 06, 2019 09:37:07.969 [4160] DEBUG - It took 31.250000 ms to retrieve 149 items.
Jun 06, 2019 09:37:12.299 [4160] DEBUG - It took 31.250000 ms to retrieve 208 items.
Jun 06, 2019 09:37:18.214 [4160] DEBUG - It took 15.625000 ms to retrieve 194 items.
Jun 06, 2019 09:37:23.703 [4160] DEBUG - It took 31.250000 ms to retrieve 243 items.
Jun 06, 2019 09:37:30.699 [4160] DEBUG - It took 15.625000 ms to retrieve 206 items.
Jun 06, 2019 09:37:36.536 [4160] DEBUG - It took 31.250000 ms to retrieve 179 items.
Jun 06, 2019 09:37:41.694 [4160] DEBUG - It took 31.250000 ms to retrieve 151 items.
Jun 06, 2019 09:37:46.009 [4160] DEBUG - It took 31.250000 ms to retrieve 123 items.
Jun 06, 2019 09:37:49.548 [4160] DEBUG - It took 31.250000 ms to retrieve 154 items.
Jun 06, 2019 09:37:53.967 [4160] DEBUG - It took 31.250000 ms to retrieve 162 items.
Jun 06, 2019 09:37:58.653 [4160] DEBUG - It took 31.250000 ms to retrieve 160 items.
Jun 06, 2019 09:38:03.263 [4160] DEBUG - It took 46.875000 ms to retrieve 163 items.
Jun 06, 2019 09:38:07.945 [4160] DEBUG - It took 31.250000 ms to retrieve 161 items.
Jun 06, 2019 09:38:12.512 [4160] DEBUG - It took 31.250000 ms to retrieve 154 items.
Jun 06, 2019 09:38:16.854 [4160] DEBUG - It took 31.250000 ms to retrieve 170 items.
Jun 06, 2019 09:38:21.882 [4160] DEBUG - It took 31.250000 ms to retrieve 146 items.
Jun 06, 2019 09:38:26.118 [4160] DEBUG - It took 31.250000 ms to retrieve 197 items.
Jun 06, 2019 09:38:31.991 [4160] DEBUG - It took 31.250000 ms to retrieve 220 items.
Jun 06, 2019 09:38:38.358 [4160] DEBUG - It took 31.250000 ms to retrieve 207 items.
Jun 06, 2019 09:38:44.313 [4160] DEBUG - It took 31.250000 ms to retrieve 198 items.
Jun 06, 2019 09:38:49.985 [4160] DEBUG - It took 31.250000 ms to retrieve 206 items.

Tested with the following structure on a library with 2600 items:

X:\Movies1080\Z\Zorro (1975) [tt0072448]\Zorro.1975.1080p.BluRay.REMUX.AVC.DTS-HD.MA.2.0-FGT.mkv

X:\Movies1080 added as a single directory to the library.

It is not what you suggested but it is the closest I can come without moving massive amounts for data.

Using this structure the delay was around 20 seconds.

Compared to the previous structure with 28 different folders added to the library, which uses 10 minutes.

Log from single folder:

Jun 07, 2019 10:37:17.711 [6696] INFO - Plex Media Scanner v1.15.8.1163-005053bb5 - Microsoft PC x64 - build: windows-x86 - GMT 02:00
Jun 07, 2019 10:37:17.711 [6696] INFO - Windows version: 6.2 (Build 9200), language en-US
Jun 07, 2019 10:37:17.711 [6696] INFO - 8 3696 MHz processor(s): Architecture=0, Level=6, Revision=40458 Processor Identifier=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
Jun 07, 2019 10:37:17.712 [6696] DEBUG - "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe" --scan --refresh --section 13 --directory "X:\Movies1080\Z\Zorro (1975) [tt0072448]" 
Jun 07, 2019 10:37:17.715 [5392] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Jun 07, 2019 10:37:18.197 [5392] DEBUG - It took 15.625000 ms to retrieve 212 items.
Jun 07, 2019 10:37:20.325 [5392] DEBUG - It took 15.625000 ms to retrieve 102 items.
Jun 07, 2019 10:37:21.494 [5392] DEBUG - It took 15.625000 ms to retrieve 142 items.
Jun 07, 2019 10:37:26.205 [5392] DEBUG - It took 0.000000 ms to retrieve 121 items.
Jun 07, 2019 10:37:27.041 [5392] DEBUG - It took 15.625000 ms to retrieve 109 items.
Jun 07, 2019 10:37:28.781 [5392] DEBUG - It took 15.625000 ms to retrieve 182 items.
Jun 07, 2019 10:37:30.078 [5392] DEBUG - It took 15.625000 ms to retrieve 608 items.
Jun 07, 2019 10:37:34.156 [5392] DEBUG - It took 15.625000 ms to retrieve 176 items.
Jun 07, 2019 10:37:35.644 [5392] DEBUG - Scanning [Cloud] Movies using en(Plex Movie Scanner) with 1 current media items and 1 section locations in the database...
Jun 07, 2019 10:37:35.644 [2536] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=13&sinceTime=1559895455
Jun 07, 2019 10:37:35.692 [5392] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Jun 07, 2019 10:37:35.692 [5392] DEBUG -   * Scanning X:\Movies1080\Z\Zorro (1975) [tt0072448]
Jun 07, 2019 10:37:35.693 [5392] DEBUG -     * Scanning directory X:\Movies1080\Z\Zorro (1975) [tt0072448] (parent: yes)
Jun 07, 2019 10:37:35.693 [5392] VERBOSE -     * Noting that 'Z\Zorro (1975) [tt0072448]' was updated at 2019-05-11 05:31:21
Jun 07, 2019 10:37:35.693 [5392] VERBOSE -     * Taking directory 'Z/Zorro (1975) [tt0072448]' (80752) out of the map (0 left)
Jun 07, 2019 10:37:35.694 [5392] DEBUG - Adding file for scanner: "X:\Movies1080\Z\Zorro (1975) [tt0072448]\Zorro.1975.1080p.BluRay.REMUX.AVC.DTS-HD.MA.2.0-FGT.mkv"
Jun 07, 2019 10:37:35.697 [5392] DEBUG - Skipping over directory 'Z\Zorro (1975) [tt0072448]', as nothing has changed; removing 1 media items from map.
Jun 07, 2019 10:37:35.702 [5392] DEBUG - Removing 0 media items that were left.
Jun 07, 2019 10:37:35.702 [5392] DEBUG - Removing 0 directories that were left.
Jun 07, 2019 10:37:35.703 [5392] DEBUG - Refreshing section 13 of type: 1
Jun 07, 2019 10:37:35.704 [6188] DEBUG - Refreshing 0 IDs.

Log from multiple folders:

Jun 07, 2019 10:41:24.472 [5876] INFO - Plex Media Scanner v1.15.8.1163-005053bb5 - Microsoft PC x64 - build: windows-x86 - GMT 02:00
Jun 07, 2019 10:41:24.472 [5876] INFO - Windows version: 6.2 (Build 9200), language en-US
Jun 07, 2019 10:41:24.472 [5876] INFO - 8 3696 MHz processor(s): Architecture=0, Level=6, Revision=40458 Processor Identifier=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
Jun 07, 2019 10:41:24.473 [5876] DEBUG - "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe" --scan --refresh --section 13 --directory "X:\Movies1080\Z\Zorro (1975) [tt0072448]" 
Jun 07, 2019 10:41:24.948 [5436] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Jun 07, 2019 10:41:25.111 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:41:45.362 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:42:05.676 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:42:26.147 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:42:46.582 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:43:07.177 [5436] DEBUG - It took 31.250000 ms to retrieve 2565 items.
Jun 07, 2019 10:43:27.599 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:43:50.648 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:44:05.524 [5436] DEBUG - It took 78.125000 ms to retrieve 0 items.
Jun 07, 2019 10:44:17.891 [5436] DEBUG - It took 31.250000 ms to retrieve 2565 items.
Jun 07, 2019 10:44:47.856 [5436] DEBUG - It took 31.250000 ms to retrieve 2565 items.
Jun 07, 2019 10:45:08.609 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:45:29.096 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:45:49.692 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:46:10.336 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:46:30.902 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:46:51.349 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:47:12.349 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:47:33.109 [5436] DEBUG - It took 31.250000 ms to retrieve 2565 items.
Jun 07, 2019 10:47:53.854 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:48:14.475 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:48:35.433 [5436] DEBUG - It took 31.250000 ms to retrieve 2565 items.
Jun 07, 2019 10:48:36.026 [5436] DEBUG - It took 62.500000 ms to retrieve 0 items.
Jun 07, 2019 10:48:40.573 [5436] DEBUG - It took 78.125000 ms to retrieve 0 items.
Jun 07, 2019 10:48:58.183 [5436] DEBUG - It took 31.250000 ms to retrieve 2565 items.
Jun 07, 2019 10:49:20.516 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:49:31.717 [5436] DEBUG - It took 78.125000 ms to retrieve 0 items.
Jun 07, 2019 10:49:41.253 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:50:01.942 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:50:23.624 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:50:44.835 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:51:05.411 [5436] DEBUG - It took 15.625000 ms to retrieve 2565 items.
Jun 07, 2019 10:51:26.200 [7040] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=13&sinceTime=1559896286
Jun 07, 2019 10:51:26.200 [5436] DEBUG - Scanning [Cloud] Movies using en(Plex Movie Scanner) with 1 current media items and 1 section locations in the database...
Jun 07, 2019 10:51:26.202 [7040] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=13&sinceTime=1559896286
Jun 07, 2019 10:51:26.255 [5436] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Jun 07, 2019 10:51:26.255 [5436] DEBUG -   * Scanning X:\Movies1080\Z\Zorro (1975) [tt0072448]
Jun 07, 2019 10:51:26.256 [5436] DEBUG -     * Scanning directory X:\Movies1080\Z\Zorro (1975) [tt0072448] (parent: yes)
Jun 07, 2019 10:51:26.256 [5436] VERBOSE -     * Noting that 'Zorro (1975) [tt0072448]' was updated at 2019-05-11 05:31:21
Jun 07, 2019 10:51:26.257 [5436] VERBOSE -     * Taking directory 'Zorro (1975) [tt0072448]' (48384) out of the map (0 left)
Jun 07, 2019 10:51:26.258 [5436] DEBUG - Adding file for scanner: "X:\Movies1080\Z\Zorro (1975) [tt0072448]\Zorro.1975.1080p.BluRay.REMUX.AVC.DTS-HD.MA.2.0-FGT.mkv"
Jun 07, 2019 10:51:26.260 [5436] DEBUG - Skipping over directory 'Zorro (1975) [tt0072448]', as nothing has changed; removing 1 media items from map.
Jun 07, 2019 10:51:26.263 [7040] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20Zorro%20(1975)%20[tt0072448]
Jun 07, 2019 10:51:26.266 [5436] DEBUG - Removing 0 media items that were left.
Jun 07, 2019 10:51:26.266 [5436] DEBUG - Removing 0 directories that were left.
Jun 07, 2019 10:51:26.272 [5436] DEBUG - Refreshing section 13 of type: 1
Jun 07, 2019 10:51:26.276 [7040] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20Zorro%20(1975)%20[tt0072448]
Jun 07, 2019 10:51:26.284 [5252] DEBUG - Refreshing 0 IDs.

I’ll retry the multiple folders but make the folders deeper, to see if that helps any…

Noting that 'Z\Zorro (1975) [tt0072448]' was updated at 2019-05-11 05:31:21
^^^ might help as well, to skip over folders which haven’t changed recently. This doesn’t work with shares, only with folders.

I tried adding a subfolder to all the root folder to see if that helped. Unfortunately, it did not.

Jun 07, 2019 11:54:58.885 [5748] INFO - Plex Media Scanner v1.15.8.1163-005053bb5 - Microsoft PC x64 - build: windows-x86 - GMT 02:00
Jun 07, 2019 11:54:58.885 [5748] INFO - Windows version: 6.2 (Build 9200), language en-US
Jun 07, 2019 11:54:58.886 [5748] INFO - 8 3696 MHz processor(s): Architecture=0, Level=6, Revision=40458 Processor Identifier=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
Jun 07, 2019 11:54:58.886 [5748] DEBUG - "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe" --scan --refresh --section 14 --directory "X:\Movies2160\Z\Zero Dark Thirty (2012) [tt1790885]" 
Jun 07, 2019 11:54:58.883 [2492] VERBOSE - [FFMPEG] - Rescanning for external libs: 'C\:\\Users\\aj\\AppData\\Local\\Plex\ Media\ Server\\Codecs\\392df4f-2292-windows-x86\\'
Jun 07, 2019 11:54:58.883 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\aac_decoder.dll
Jun 07, 2019 11:54:58.884 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\ac3_decoder.dll
Jun 07, 2019 11:54:58.884 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\dca_decoder.dll
Jun 07, 2019 11:54:58.885 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\h264_decoder.dll
Jun 07, 2019 11:54:58.885 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\hevc_decoder.dll
Jun 07, 2019 11:54:58.885 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\libx264_encoder.dll
Jun 07, 2019 11:54:58.886 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg1video_decoder.dll
Jun 07, 2019 11:54:58.886 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg2video_decoder.dll
Jun 07, 2019 11:54:58.887 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg4_decoder.dll
Jun 07, 2019 11:54:58.887 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\msmpeg4v1_decoder.dll
Jun 07, 2019 11:54:58.887 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\msmpeg4v3_decoder.dll
Jun 07, 2019 11:54:58.888 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\vc1_decoder.dll
Jun 07, 2019 11:54:58.888 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\vp9_decoder.dll
Jun 07, 2019 11:54:58.888 [2492] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\wmv3_decoder.dll
Jun 07, 2019 11:54:58.889 [2492] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Jun 07, 2019 11:54:58.997 [2492] DEBUG - It took 15.625000 ms to retrieve 533 items.
Jun 07, 2019 11:55:03.779 [2492] DEBUG - It took 15.625000 ms to retrieve 533 items.
Jun 07, 2019 11:55:08.545 [2492] DEBUG - It took 15.625000 ms to retrieve 533 items.
Jun 07, 2019 11:55:13.304 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:55:17.614 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:55:21.894 [2492] DEBUG - It took 15.625000 ms to retrieve 533 items.
Jun 07, 2019 11:55:26.187 [2492] DEBUG - It took 15.625000 ms to retrieve 533 items.
Jun 07, 2019 11:55:30.539 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:55:34.962 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:55:39.366 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:55:43.694 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:55:48.141 [2492] DEBUG - It took 15.625000 ms to retrieve 533 items.
Jun 07, 2019 11:55:52.558 [2492] DEBUG - It took 15.625000 ms to retrieve 533 items.
Jun 07, 2019 11:55:55.607 [2492] DEBUG - It took 62.500000 ms to retrieve 0 items.
Jun 07, 2019 11:55:56.929 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:01.337 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:05.756 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:10.086 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:14.477 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:18.821 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:23.192 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:27.537 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:31.947 [2492] DEBUG - It took 15.625000 ms to retrieve 533 items.
Jun 07, 2019 11:56:36.289 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:40.683 [2492] DEBUG - It took 15.625000 ms to retrieve 533 items.
Jun 07, 2019 11:56:45.022 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:49.413 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:53.771 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:56:58.133 [2492] DEBUG - It took 0.000000 ms to retrieve 533 items.
Jun 07, 2019 11:57:02.547 [2492] DEBUG - Scanning [Cloud] Movies (2160p) using en(Plex Movie Scanner) with 1 current media items and 1 section locations in the database...
Jun 07, 2019 11:57:02.547 [5808] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=14&sinceTime=1559900222
Jun 07, 2019 11:57:02.550 [5808] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=14&sinceTime=1559900222
Jun 07, 2019 11:57:02.597 [2492] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Jun 07, 2019 11:57:02.597 [2492] DEBUG -   * Scanning X:\Movies2160\Z\Zero Dark Thirty (2012) [tt1790885]
Jun 07, 2019 11:57:02.597 [2492] DEBUG -     * Scanning directory X:\Movies2160\Z\Zero Dark Thirty (2012) [tt1790885] (parent: yes)
Jun 07, 2019 11:57:02.597 [2492] VERBOSE -     * Noting that 'Zero Dark Thirty (2012) [tt1790885]' was updated at 2019-05-10 23:29:33
Jun 07, 2019 11:57:02.597 [2492] VERBOSE -     * Taking directory 'Zero Dark Thirty (2012) [tt1790885]' (45906) out of the map (0 left)
Jun 07, 2019 11:57:02.598 [2492] DEBUG - Adding file for scanner: "X:\Movies2160\Z\Zero Dark Thirty (2012) [tt1790885]\Zero.Dark.Thirty.2012.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv"
Jun 07, 2019 11:57:02.602 [2492] DEBUG - Skipping over directory 'Zero Dark Thirty (2012) [tt1790885]', as nothing has changed; removing 1 media items from map.
Jun 07, 2019 11:57:02.606 [5808] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20Zero%20Dark%20Thirty%20(2012)%20[tt1790885]
Jun 07, 2019 11:57:02.610 [2492] DEBUG - Removing 0 media items that were left.
Jun 07, 2019 11:57:02.610 [2492] DEBUG - Removing 0 directories that were left.
Jun 07, 2019 11:57:02.611 [2492] DEBUG - Refreshing section 14 of type: 1
Jun 07, 2019 11:57:02.613 [2484] DEBUG - Refreshing 0 IDs.
Jun 07, 2019 11:57:02.617 [5808] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20Zero%20Dark%20Thirty%20(2012)%20[tt1790885]
Jun 07, 2019 12:54:00.927 [6724] INFO - Plex Media Scanner v1.15.8.1163-005053bb5 - Microsoft PC x64 - build: windows-x86 - GMT 02:00
Jun 07, 2019 12:54:00.928 [6724] INFO - Windows version: 6.2 (Build 9200), language en-US
Jun 07, 2019 12:54:00.928 [6724] INFO - 8 3696 MHz processor(s): Architecture=0, Level=6, Revision=40458 Processor Identifier=Intel64 Family 6 Model 158 Stepping 10, GenuineIntel
Jun 07, 2019 12:54:00.928 [6724] DEBUG - "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Scanner.exe" --scan --refresh --section 14 --directory "X:\Movies2160\Z\Z\Zero Dark Thirty (2012) [tt1790885]" 
Jun 07, 2019 12:54:00.926 [4380] VERBOSE - [FFMPEG] - Rescanning for external libs: 'C\:\\Users\\aj\\AppData\\Local\\Plex\ Media\ Server\\Codecs\\392df4f-2292-windows-x86\\'
Jun 07, 2019 12:54:00.926 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\aac_decoder.dll
Jun 07, 2019 12:54:00.927 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\ac3_decoder.dll
Jun 07, 2019 12:54:00.927 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\dca_decoder.dll
Jun 07, 2019 12:54:00.927 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\h264_decoder.dll
Jun 07, 2019 12:54:00.928 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\hevc_decoder.dll
Jun 07, 2019 12:54:00.928 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\libx264_encoder.dll
Jun 07, 2019 12:54:00.928 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg1video_decoder.dll
Jun 07, 2019 12:54:00.929 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg2video_decoder.dll
Jun 07, 2019 12:54:00.929 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\mpeg4_decoder.dll
Jun 07, 2019 12:54:00.930 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\msmpeg4v1_decoder.dll
Jun 07, 2019 12:54:00.930 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\msmpeg4v3_decoder.dll
Jun 07, 2019 12:54:00.930 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\vc1_decoder.dll
Jun 07, 2019 12:54:00.930 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\vp9_decoder.dll
Jun 07, 2019 12:54:00.931 [4380] VERBOSE - [FFMPEG] - Loading external lib C:\Users\aj\AppData\Local\Plex Media Server\Codecs\392df4f-2292-windows-x86\wmv3_decoder.dll
Jun 07, 2019 12:54:00.931 [4380] DEBUG - Opening 20 database sessions to library (com.plexapp.plugins.library), SQLite 3.26.0, threadsafe=1
Jun 07, 2019 12:54:04.123 [4380] DEBUG - It took 78.125000 ms to retrieve 0 items.
Jun 07, 2019 12:54:04.622 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:54:09.797 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:54:14.946 [4380] DEBUG - It took 0.000000 ms to retrieve 123 items.
Jun 07, 2019 12:54:19.821 [4380] DEBUG - It took 0.000000 ms to retrieve 123 items.
Jun 07, 2019 12:54:24.614 [4380] DEBUG - It took 0.000000 ms to retrieve 123 items.
Jun 07, 2019 12:54:29.214 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:54:33.925 [4380] DEBUG - It took 0.000000 ms to retrieve 123 items.
Jun 07, 2019 12:54:38.700 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:54:43.592 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:54:48.423 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:54:53.289 [4380] DEBUG - It took 0.000000 ms to retrieve 123 items.
Jun 07, 2019 12:54:58.374 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:55:03.310 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:55:08.156 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:55:13.047 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:55:17.708 [4380] DEBUG - It took 0.000000 ms to retrieve 123 items.
Jun 07, 2019 12:55:22.372 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:55:26.961 [4380] DEBUG - It took 0.000000 ms to retrieve 123 items.
Jun 07, 2019 12:55:31.572 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:55:36.295 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:55:40.991 [4380] DEBUG - It took 0.000000 ms to retrieve 123 items.
Jun 07, 2019 12:55:45.622 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:55:50.362 [4380] DEBUG - It took 0.000000 ms to retrieve 123 items.
Jun 07, 2019 12:55:55.015 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:55:59.746 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:56:04.448 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:56:09.090 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:56:13.792 [4380] DEBUG - It took 15.625000 ms to retrieve 123 items.
Jun 07, 2019 12:56:15.103 [4380] DEBUG - Scanning [Cloud] Movies (2160p) using en(Plex Movie Scanner) with 1 current media items and 1 section locations in the database...
Jun 07, 2019 12:56:15.104 [7152] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=14&sinceTime=1559903775
Jun 07, 2019 12:56:15.106 [7152] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/:/metadata/notify/cullTimeline?librarySectionID=14&sinceTime=1559903775
Jun 07, 2019 12:56:15.152 [4380] DEBUG - Performing a scan with 'Plex Movie Scanner' (language: en virtual: 0).
Jun 07, 2019 12:56:15.153 [4380] DEBUG -   * Scanning X:\Movies2160\Z\Z\Zero Dark Thirty (2012) [tt1790885]
Jun 07, 2019 12:56:15.153 [4380] DEBUG -     * Scanning directory X:\Movies2160\Z\Z\Zero Dark Thirty (2012) [tt1790885] (parent: yes)
Jun 07, 2019 12:56:15.154 [4380] VERBOSE -     * Noting that 'Z\Zero Dark Thirty (2012) [tt1790885]' was updated at 2019-06-07 12:23:42
Jun 07, 2019 12:56:15.154 [4380] VERBOSE -     * Taking directory 'Z/Zero Dark Thirty (2012) [tt1790885]' (81993) out of the map (0 left)
Jun 07, 2019 12:56:15.155 [4380] DEBUG - Adding file for scanner: "X:\Movies2160\Z\Z\Zero Dark Thirty (2012) [tt1790885]\Zero.Dark.Thirty.2012.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv"
Jun 07, 2019 12:56:15.157 [4380] DEBUG - Skipping over directory 'Z\Zero Dark Thirty (2012) [tt1790885]', as nothing has changed; removing 1 media items from map.
Jun 07, 2019 12:56:15.162 [7152] DEBUG - HTTP requesting GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20Z%5CZero%20Dark%20Thirty%20(2012)%20[tt1790885]
Jun 07, 2019 12:56:15.166 [4380] DEBUG - Removing 0 media items that were left.
Jun 07, 2019 12:56:15.166 [4380] DEBUG - Removing 0 directories that were left.
Jun 07, 2019 12:56:15.167 [4380] DEBUG - Refreshing section 14 of type: 1
Jun 07, 2019 12:56:15.169 [4544] DEBUG - Refreshing 0 IDs.
Jun 07, 2019 12:56:15.173 [7152] DEBUG - HTTP 200 response from GET http://127.0.0.1:32400/:/metadata/updateProgressMessage?message=Scanning%20Z%5CZero%20Dark%20Thirty%20(2012)%20[tt1790885]

Is there any way to log/output the SQL statments? I think that would have helped a lot in troubleshooting this.