Troubles loading in pgAdmin 4 - pgadmin-4

I am using the PgAdmin 4,
When I am loading the data,
it takes too much time to load it
.
what can I do to make it faster?

Related

MongoDB slow in fetching from database

I'm using MongoDB in combination with Meteor + React and the result fetching takes like 5 sec even on a small database.
This happens only on the production server (AWS) and it works instantly on the local machine.
In order to fetch the results, I'm using the following code.
return{ cand : Job.find({thejob:props.id}).fetch() };
and to see if the array has been loaded, I use the following code on the frontend side.
if(!this.props.cand){return(<div>Loading....</div>)}
but the Loading.... takes like 5 sec on the server always. The database is a small one with less than 1000 records.
I have had similar experiences. The performance is pretty good when you run the queries in the local machine. If the query is slower in platforms like AWS and not on the local, it's mostly due to the Network latency.
I suspect there isn't an index on the thejob field.
First check if there is an index on thejob field
db.job.getIndexes()
If there is none, simply create one
db.job.createIndex({thejob:1})

Run shiny app permanetly on server

I have developed a shiny app, first have to run SQL queries which need around 5-10 minutes to be ran. The building of the plots afterwards is quite fast.
My idea was to run the queries once per day (with invalidLater) before shinyServer(). This worked well.
Now I got access to a shiny server. I could save my app in ~/ShinyApps/APPNAME/ and access it by http://SERVERNAME.com:3838/USER/APPNAME/. But if I open the app, while it is not open in some other browser it takes 5-10 min to start. If I open it, while it is also open on another computer it starts fast.
I have no experience with severs, but I conclude my server only runs the app as long someone is accessing it. But in my case it should be run permanently, so it always starts fast and can update the data (using the sql queries) once per day.
I looked up in the documentation, since I guess it is some setting problem.
To keep the app running:
Brute force: You can have a server/computer, have a view of your app open all the time so it does not drop from shiny server memory. but that won't load new data.
Server settings: you can set the idle time of your server to a large interval, meaning it will wait that interval before dropping your app from memory. This is done in the shiny-server.conf file with fx. app_idle_timeout 3600
To have daily updates:
Crontab:
Set up a crontab job in your SSH client fx. PuTTY:
$ crontab -e
like this(read more: https://en.wikipedia.org/wiki/Cron):
00 00 * * * Rscript /Location/YourDailyScript.R
YourDailyScript.R:
1. setwd(location) #remember that!
2. [Your awesome 5 minute query]
3. Save result as .csv or whatever.
and then have to app just load that result.

How to reduce the page loading time in drupal for firsttime

I am developing a website in drupal7, it takes 8 to 10 seconds to load each page the first time, next time it takes 1 to 2 seconds. I have enabled cache, css compression and JS compression.
Please provide suggestion to reduce the time of first time loading.
There are some steps by which you can improve your site performance:
If you are using image on your site so please try to upload image in
KB or Bytes.
Use http compression.
Use cache module like varnich, mamcache, APC etc.
Enable default cache system of drupal (in your case it is already
enabled).
Enable CSS and JS compression (in your case it is already
enabled).
For further details please follow these 2 links
drupal.stackexchange.com/why-is-drupal-7-so-slow
5-ways-to-improve-performance-in-drupal

How to use all cpu cores vs2010 winform design?

I have Visual Studio 2010 and my computer have 4 cpu cores.
In a c# project when I'm in "Design" mode on a Form and I... select a control...go to its property page...change its text and hit Enter, then it takes a lot of time cause VS uses only 1 cpu core for the recalculation. It takes about 20 sec to change a button text. Can I configure VS to use all 4 CPU cores?
From your comments, no you can not use more than one thread to make the UI update itself quicker.
However 20 seconds to update 200 controls is extremely slow, that is 100 ms per control! I would recommend running a code profiler on your code so you can see what is actually causing the slowness when you update some text and fixing that part of the program.

cakePHP - Simple insert statements taking long time to execute

We are using the cakePHP framework and have deployed the application on our product environment. We have noticed that insert statements are taking a long time to execute. Sometimes a simple insert statement takes 6 seconds which is way too much.
We have switched the persistent key to true in database.php and it seems to improve alot, but still, sometimes queries do take 2 to 3 seconds. Is it a good idea to have this switched on?
Any advice on why and how we can improve execution times?
Thanks
Regards
Gabriel
Does it take long on the local dev environment? Set debug to 2 in core.php to get an sqldump that will show you each SQL statement and time for each. Maybe you have too many joins?
Remember to add the sql dump element to your layout:
<?php echo $this->element('sql_dump'); ?>

Resources