Not the answer you need?
Register and ask your own question!
Many Forum changes were implemented on Tue 22 Sep. Read about new Ranks, Scoring, and Reactions.
Email [email protected] for any comments or concerns.

Increasing Performance with VIEWS

SpeepleSpeeple ContributorInactive User Role Beginner
Hi,

I'm working on some blogging software which uses MySQL as a datas tore.

Each archive page, year, month, day can have a tag cloud generated to show the most popular tags for that day.

Currently I'm using a derived table. Then I stumbled across your article "Derived Tables and Views Performance" and tested a query with a VIEW and it was indeed theoretically faster because the number of rows required in the query that used the VIEW was SUBSTANTIALLY lower than that of the derived query.

What I was thinking of implementing was temporay VIEWs each time the tag cloud needs to be generated (every page view eek: ).

So it would go:

CREATE VIEW for IDs

PERFORM query USING VIEW

DROP VIEW

Remembering this would be performed every page view, for every visitor on every blog hosted (we're talking a lot of VIEWS being created and DROPPED here) - how would it perform? Does this require a lot of IO operations?

Thank you!

Comments

  • PeterPeter Percona CEO Percona Moderator Role
    Why ask, better benchmark it )

    Generally it hould not be that expensive however if --sync-frm is dependent it may need fsync which is relatively expensive.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.