1

I have a big SQL file which have some queries. I wish to know how many time takes the execution of the entire file.

I open the file in "Query Tool" in pgAdmin 4 and it takes 1 minute to execute "successfully" but when I go to "View data", the table is empty (this must not happen because the file has 100.000 insertions, some selections and it does not have any deletion).

It is not a system error because I execute another query an it works. The SQL file size is 32,4 MB.

Why does this happen?

Could be due to the file size?

4
  • What happens when you break the file up? Commented Jan 11, 2017 at 14:54
  • 2
    Is the last statement in the file not a SELECT statement? Commented Jan 11, 2017 at 15:23
  • I found that in pgAdmin 3, it takes 3 hours, 34 mins and 48 seconds to execute. I broke up the file in two parts, the insertion section and the selection/update section; in this moment the insertion section works but I have not tested the second section pgAdmin 4. May be pgAdmin 4 does not support big files, I think that pgAdmin 3 is better than pgAdmin 4 in this case. Commented Jan 12, 2017 at 16:01
  • You are saying "big" and then saying 32.4 Mb. Is there a typo there? 32.4 Mb is not big (well it is a relative term), neither is 100 K insertions. (Personally I like pgAdmin 3 LTS by Bigsql). 3 hrs for 32.4 Mb is unacceptable IMHO. Commented Feb 7, 2017 at 13:04

1 Answer 1

3

One thing to consider is the status of autocommit. Remember that in some circumstances you can issue a lot of insert statements, but none of them will take effect unless they are committed. The query may not be seeing anything because the transactions have not been made permanent by the time the select is issued.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, you help me a lot. In fact, when I go to "View Data" and it is empty it is because PgAdmin did not commit the changes, it is because the selection takes much more time than the insertions due the nature of the queries. When I run only the insertions it takes 3.4 seconds approximately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.