mysql q

mysql q

E.S. Rosenberg esr+linux-il at g.jct.ac.il
Sun Nov 17 10:40:55 IST 2013


I don't know about triggers, but you could have a caching mechanism
server side, which queries for last update to determine whether a new
page needs to be rendered and serves the cached page.

You could also make sure that the auto refreshes cause only the
relevant queries and not all the queries involved in rendering the
full page (use AJAX/jQuery/YUI/etc. to refresh only a small part of
the page).

You can and should also use prepared statements/stored procedures to
help speed up queries.

As far as OSS solution goes MySQL/MariaDB still outstrip PG in
performance by factor 10 at least according to the last article I read
on the subject so on a site complaining about performance I would not
switch to pgsql. (and pray do tell why MySQL/MariaDB are not true OSS,
the core of both products is completely OSS, so we may not trust
Oracle, then MariaDB is there...)

Regards,
Eliyahu - אליהו

2013/11/17 Erez D <erez0001 at gmail.com>:
> hello
>
> i have a web page that refreshes all the time to display things from a mysql
> database which is updated from time to time.
> however. this meens a lot of un-needed acesses to the database. and this
> refresshing page may be openede by many browsers. causing a huge load on the
> database.
>
> i know mysql supports triggers, but it seems this is only internal (i.e.
> trigger may do a query, usually an "update" query, but this is not what i
> need).
>
> I am looking for a way to leave the connection open with mysql, not sending
> any queries, just waiting for mysql to notify me when a somthing changes.
>
> does mysql support that ?
> examples of doing that will be nice
>
>
> thanks,
> erez.
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>



More information about the Linux-il mailing list