qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.43k stars 2.98k forks source link

Project loading became slow when it contains Oracle layers #34328

Open aetor opened 4 years ago

aetor commented 4 years ago

Since 1 week I am Using QGIS-version 3.10.2-A Coruña. When I am opening older Qgs or QGZ files, its slow or Qgis will freese! I have shapes, oracle connections, en making a query from Oracle, and saving to SQLITE, it takes way longer then the older version. When I add for example 3 new shapes and 1 Oracle layer, and I want to close Qgis. it takes minutes! the old version it takes seconds.

Today I open the same files with Qgis 3.8 and that still works great, no problem and saving takes seconds.. so the latest version is not working fine!

(I am dutch, so explaining it in english is difficult!)

gioman commented 4 years ago

@aetor any chance ypu can share a project (with data) that demonstrate the issue?

Regardless the above also try run QGIS with a new QGIS profile, do not install any 3rd party plugins and see if it improves.

aetor commented 4 years ago

I can not share my data, I have WMS, Shape, oracle and ECW data In 1 QGS file. I have tried everything, but in QGIS 3.8.2-Zanibar I can open en save the .qgs or .qgz file of my map. when i open the same files (,qgs or .qgz) and i tried to save it, Qgis is freezing. The only why is to hit the windows cross right up and then select "try to repair qgis" then the file comes alive. For now I will use Qgis 3.8.3 and I will remove the Long Term edition 3.10!

gioman commented 4 years ago

@aetor without possibility to test you project and not not much more details (other than a general idea of what it is in your project) it will be very hard to help or check if the there is any kind of problem in QGIS.

Have you tried you a new QGIS profile?

aetor commented 4 years ago

I work with data of local government, I can not share it! but when I have a QGZ file with many shapes, oracle links and a ECW 40GB... and i will save it in Qgis 3.10, it will freeze Qgis. opening the same file in 3.8.3 with the same ecw and oracle, i can save it and close it... @gioman You are suggesting to renew my profile... how should i do that?

gioman commented 4 years ago

@aetor settings > user profiles > new profile

aetor commented 4 years ago

Hello, today I tried 2 things, first, I made a new profile! second, I installed version 3.12 of Qgis.

I have made a screenshot movie of loading the same Qgs file in version 3.8 and in version 3.12, In the 3.8 version, within 10 seconds I have the file loaded, in the 3.12 version, it took 1m20sec to see the same file! (look the movies at: https://www.dropbox.com/sh/12vx3pdga1ylf3v/AACrxwaboeXKd0fqnC0LDV64a?dl=0 ) HERE) The new profile is used in both versions!

So, If i have a Oracle connection, in version 3.10 or above, its will slow the system !!!!

greetings AE

gioman commented 4 years ago

So, If i have a Oracle connection, in version 3.10 or above, its will slow the system !!!!

@aetor so the culprit are the layers from oracle connections? if you remove them the project loads quicker?

aetor commented 4 years ago

@gioman YES!, I just removed the Oracle layer and saved the project, and open it in version 3.12 and within seconds i have my screen loaded!

gioman commented 4 years ago

YES!, I just removed the Oracle layer and saved the project, and open it in version 3.12 and within seconds i have my screen loaded!

@aetor title changed accordingly.

aetor commented 4 years ago

@gioman Good that you change the title, but when I made the call. i did not know that the problem the Oracle layer was! :-)

gioman commented 4 years ago

See https://github.com/qgis/QGIS/pull/34738

aetor commented 4 years ago

@gioman I read the solution, but can someone tell me where I have to put the text?

where do I find this -> /src/providers/oracle/qgsoracleprovider.cpp or where to put it in?

elpaso commented 4 years ago

@aetor that is C++ source code, if you are not building QGIS by yourself you need to wait and grab a nightly build after the PR has been merged.

andyt69 commented 3 years ago

I'm experiencing the same exact issue with 3.16.1-Hannover. I resolved (maybe...) limiting the rownum of the query using "where rownum <" by specifying a number a little bit greater then the real number of records the query returns in sqldeveloper. Of course this is annoying :) but hope can give some indication to correct the code.

Pedro-Murteira commented 2 years ago

@aetor Hello, is this issue still valid on recent releases?

aetor commented 2 years ago

Yes, opening a Qgis file with Oracle connection takes long time. after 3-4 minutes it is load and then you can work with it quit nice saving an reopen it does not speed up!

In the Qgis file, I have some shapes and oracle tables that are count, i think that takes also some time!

I also tried open a orcale table in a new Qgis window, and that opens quick!  

Op dinsdag 26 april 2022 16:50:15 CEST schreef pmurteira ***@***.***>:  

@aetor Hello, is this issue still valid on recent releases?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

leafisfalling commented 2 years ago

Hello!

We are experiencing similar problem.

We have several QGIS projects which have layers coming from oracle database. Those layers are heavy so we choose to make them invisible in the projects so that we can load the project much quicker. If we want to open the heavy layer later on then we just click the layer and let it take some time to load the corresponding data to the project.

This has been working fine for version 3.10 and 3.16. But lately we upgradede my QGIS to version 3.22 and now it always take a much longer time to open the projects, and it seems to me that whenever we open the projects then QGIS loads all the data from all Oracle layers in the project as well, even though they are not visible in the begining. so now it becomes very long loading time for the projects but very short loading time to make the layers visible.

aetor commented 2 years ago

Hello!

We are experiencing similar problem.

We have several QGIS projects which have layers coming from oracle database. Those layers are heavy so we choose to make them invisible in the projects so that we can load the project much quicker. If we want to open the heavy layer later on then we just click the layer and let it take some time to load the corresponding data to the project.

This has been working fine for version 3.10 and 3.16. But lately we upgradede my QGIS to version 3.22 and now it always take a much longer time to open the projects, and it seems to me that whenever we open the projects then QGIS loads all the data from all Oracle layers in the project as well, even though they are not visible in the begining. so now it becomes very long loading time for the projects but very short loading time to make the layers visible.

Yes, I still have this issue too!

aetor commented 10 months ago

Hello all, I am no working with version QGIS Desktop 3.32.3, and still have this problem :-(