Progress Bar for SQL Query

I am in the process of creating a web app that queries information from a database and then creates a graph. However sometimes the query/graph generation is incredibly slow.

Can anyone help me either 1) make this faster? I saw information about client side callbacks but I’m not sure if that’ll work if it’s reading a database and I’m not super familiar with JS. or 2) Show me how to implement a progress bar that reads how much it’s done?

Thanks!

HI @bpolasek,

I would say it’s pretty difficult to “make this faster” with the information you provide :upside_down_face:

Clientside callbacks are really handy if you don’t need information from the serverside to update/change components in your app.

Concerning the progress-bar:

Unfortunately I think I do need things from the server. If I’m understanding all this right. Newbie here. I am pulling data from my companies database to create a graph. That part is what is taking so long.

Yes, you are right. Not sure if there is a general answer how to speed things up, it depends on your setup and kind of data/chart,…

Speed related topics: :wink:
https://community.plotly.com/search?q=speed

General perfomance guidline:

1 Like

Thank you!

Hello @bpolasek,

If you are looking to speed up a query, then you can have a view or a table set up of how things are needing to be done in order to cut down on processing time.

If you need this information to be updated periodically, you can have a procedure that updates the table in the background every so often through a SQL agent. (I do this for my own company as querying this data all the time would take too long)

If you dont need to worry about any cross over, you could use a caching server like Redis as well.