Joining a view using an existing view in mySQL [closed] - mysql

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I created a table view and joined it to an existing view. Is this a good way?
I'm wondering when the rows in the table piles up, will the performance be affected?
What are the other possible problems that I will encounter when I do this?

It is hard to say whether this way is good or not. It depends on your database design. Views have some advantages, so if you need to use views, then use them. But views may have bad performance, have a look at this article - MySQL VIEW as performance troublemaker.

Related

Is it possible to use MongoDB as a substitude for MySQL in a particular scenario? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I am participating in an project that using MongoDB as the datasorce instead of MySQL. The project is an APP for live-streaming with large amount of data and frequent IO. I am not sure if MongoDB is better than MySQL in this scenario.
Very likely no. MongoDB would excel in cases where you have hierarchical data in several levels and an arbitrary structure. If your data falls naturally into columns and tables then MySQL would likely trounce MongoDB.

Usage of multiple trigger statements [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
What are triggers in mysql. And how to use triggers?
There are several good reasons to use triggers, for example to:
Populate column values automatically.
Enforce complex integrity constraints.
Enforce complex business rules.
Maintain replicate tables.
Audit data modification.
However, triggers can sometimes be a maintenance headache The worst case scenario I have come across is that a trigger was accidentally disabled. In your example that would mean that stock and money transactions would not get updated when a purchased is made without any form of warning or error. I also have seen databases where triggers get chained across multiple tables and that make debugging quite complex.

How to troubleshoot/debug a MySQL slow query? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
If you have a slow SQL query, how do you debug it?
Where do you start and what are the steps needed to identify the problem?
I'm new to this subject and searching online wouldn't give me a clear idea how to start.
Your best tool is to look at the execution plan. On a high level, the execution plan shows how the query is executing, and what parts of the query take more processing relative to the other parts. This is the best anyone on this site would be able to do for you without seeing the query, and the execution plan for that matter. There are so many things that could be causing the problem.
Here are a few references (depending on what version of MySQL you are in)-
http://dev.mysql.com/doc/refman/5.5/en/execution-plan-information.html
http://dev.mysql.com/doc/refman/5.0/en/execution-plan-information.html

what are the main differences between mysql and postgres? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I want to create a new rails application and I'm not sure whether to use MySQL or Postgres. Which one is best and what is the difference between them?
UPDATE:
The project is a health-care project. It may contain more than 500 tables.
postgres is secure, fast, and full of features but comparatively tricky to use.
MySql has its own benefits along with large user community and vast materials. Immensely helpful if you ever get stuck.
But ultimately it all comes to your preference and framework (apart from rails if your app requires any) support.
Read this for detailed comparison and insights: http://wiki.postgresql.org/wiki/Why_PostgreSQL_Instead_of_MySQL%3a_Comparing_Reliability_and_Speed_in_2007

What is a good beginner's guide for MYSQL Partitioning? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Including...how to set up the partition, how to determine which partition to talk to...etc.
I know replication but am new to partitioning.
Improving Database Performance with Partitioning
http://dev.mysql.com/tech-resources/articles/partitioning.html
This would be a good start: MySQL Partitioning Overview
Also, I haven't watched this one specifically, but the presentations by the Pythian group are usually pretty good. Reading a manual may be more efficient, but as an alternative this video will teach you quite a bit about partitioning in MySQL.
Partitioning in MySQL 5.1