question

Donghuang L3 avatar image
0 Likes"
Donghuang L3 asked Donghuang L3 commented

Slow SQL query with large Storage System

Hi, I am building a model for a warehouse of over 100,000 storage items. I customize my control logic in process flow to call SQL queries to the default StorageSystem object.
The model is running very slow. I checked the resource usage in Performance Profiler and found out that the SQL queries to the StorageSystem are the main causes. However, I have to check the storage items in every retrieval request, and check the slots in every storage request, because exploring such kinds of policies is the goal of this simulation project.
1678208316356.pngIs there a more efficient way for modeling a warehouse of this scale?

Thanks.

FlexSim 22.2.2
sqlstorage systemmodel is slow
1678208316356.png (33.8 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
anthony.johnson avatar image
0 Likes"
anthony.johnson answered Donghuang L3 commented

This is specifically what the indexing system is meant for. You can add labels to items and the storage system will keep an index the label values for items in storage.

  1. In the storage system properties, go to the Items tab, add the labels that you are going to use and check the 'Indexed' box.
    1678212794704.png
  2. In your queries, filter by these labels with the WHERE clause.

The storage system will be able to do a fast lookup if you are filtering by certain indexed label values.

However, if you absolutely need to compare every single item in storage, then unfortunately there isn't much you can do to improve speed. Analyzing thousands of stored items on every single decision is just a lot of computational load. There's not much you can do about it.

See the user manual for more information.


1678212794704.png (20.8 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Donghuang L3 avatar image Donghuang L3 commented ·

Thank you Anthony. May I ask another question: is there a way set up an object's "More Visuals - Visual Contents" by code?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.