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.
Related
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 4 years ago.
Improve this question
i work on a project with node.js and a mysql database.
i have a connection between them with the npm modul mysql.
Now my question:
is it better to send a SQL command and sort the data in node.js or multiple detailed sql commands?
what is faster / more performant?
Thanks.
Without knowing the exact SQL queries, I would say that database operations are faster compared to your own implementation. Many smart people have worked to assure performance, accuracy, atomicity, concurrency etc. of the Mysql engine.
Even if you can gain marginal improvements in some aspect with your own code, it is unlikely that you will be able to justify the investment.
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 3 years ago.
Improve this question
I've webhook, which is hitting with multiple entries on my function. Sometime when there are 10 to 15 request, the database insert and update query is missing.
There could be many solutions like :-
Add Queuing system, on api request add job in queue response back & let queue add to database.
Use what databases do, they add to file and then from file they push to database.
There could be many other solutions and also maybe above 2 may not work for you perfectly, which solution to choose depends upon what you are doing
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
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 9 years ago.
Improve this question
I have two problems with MySQL and started wondering if I should switch to Postgres
1 - Incremental backups are only available on the paid version of MySQL.
2 - It seems that mySQL has performance issues in some cases
So, are these two problems solved with Postgres?
I guess that PostgreSQL's continuous archiving can be considered a valid alternative
for every dbms you can find plenty anecdotal evidence of situations they cannot handle properly/quickly, or only with massive help in the form of cunning query rewrites, data remodelling and whatnot. Just look around here on SO or on any of the thousands of db-centered sites all over the net to see what I mean.
In short, where 1 can be a solid argument to justify a switch (and especially from a business point of view), I wouldn't be overly concerned about 2. And if your db is slow because your datamodel is not performance friendly, you'll just carry over slowness.
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.