PipeCAD icon indicating copy to clipboard operation
PipeCAD copied to clipboard

Limitations of db numbers

Open rompik opened this issue 2 years ago • 3 comments

During creating database system check db number, which has to be in range 1-8000. Is it some Core limitations, which requires following this rule? Currently, I see only one reason for it: Windows performance in case if folder %PROJ_ID%000 will contain big number of files. But in this case, dbs files can be placed in several folders using Area (currently option if commented in the Python code).

rompik avatar Jun 21 '22 12:06 rompik

Yes, the reason is Windows perfromance problem. If not, for %PROJ_ID%/0000 will range [1-9999] and %PROJ_ID%/00000 can range [1-99999].

If you think the db number limitation is unreasonable, I will set the range [1-9999] for %PROJ_ID%/0000 .

eryar avatar Jun 22 '22 00:06 eryar

I think db number is reasonable, but we can use the same solution as in PDMS - split db files by different folders using Area attribute. Especially, you already added column in database table inside SQL database. Currently, I develop a utility (same like in E3D), which will import Users, Teams, Databases, Mdbs from Excel file. It will allow to create/update all required admin elements, using exported file from E3d.

image

image

As for testing I used file from real E3d project I had issues with db numbers. We have some db numbers more than 10 000 (for some design or catalogues dbs). But in this case we used different areas (we tried to keep not more 1500 dbs files in 1 folder): %TST000%, %TST100%, %TST200%, %TST300%. I will be appreciated if you can add functionality for creating different folders and use it by different variables %PROJ_ID%Areas. I'm not really like this way, but for version 1.x it's good decision. But for PipeCad version 2.x, I think better to move project to PostgreSQL instance to remove "bottle neck" in read/write operations to project file.

rompik avatar Jun 22 '22 07:06 rompik

Great! I will think about Areas.

Yes, now the DB are SQLite files, when the function are completed and we will consider to use PostgreSQL to store project data.

eryar avatar Jun 22 '22 09:06 eryar