0

A basic Bootstrap progress bar looks like this:

<div class="progress">
   <div class="progress-bar" role="progressbar" aria-valuenow="70"
   aria-valuemin="0" aria-valuemax="100" style="width:70%">
     70%
   </div>
</div>

How could I update in real time the percentage values, based upon the progress of a Mysql SELECT query that takes from a few seconds up to a minute to finish.

I´m using php for the application.

Thanks!

3
  • 2
    I don't think this is possible. A work around that comes to mind is to query parts of data set (table) in a loop and on each iteration send a response. Commented Mar 11, 2015 at 17:30
  • 1
    Not sure, depends on several things. Wait for some mysql experts to respond. Interesting idea though, I would use something like this myself for some projects. Commented Mar 11, 2015 at 17:40
  • Show us what is going on on php side? what query are you trying to get? is it really slow? is there data transformation part? Commented Mar 11, 2015 at 18:20

1 Answer 1

3

UPDATE: Looks like this is possible with MariaDB 5.3+ now. anyway, I wouldn't suggest doing this because you'll use vendor-specific extensions.

Referring to MySQL Long Query Progress Monitoring, it isn't possible to monitor a MySQL query. The only thing you could do is to split queries and then check how many queries ran through already.

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

2 Comments

@caCtus, now it should fit
It's possible with MariaDB now: mariadb.com/kb/en/library/progress-reporting

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.