Query optimization techniques? [closed] - mysql

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
How to optimize queries which are already written?

Use EXPLAIN to see what's going on - what indexes are being used and so on.

If you can not change the them:
Indexes and statistics.
So you don't optimize the query but their execution plan.

If you can't change the query then it really depends on what features are available on your database engine of choice. As Ovidiu said you can use indexes and generate usage statistics to see where the bottleneck is.
Otherwise you can employ techniques like materialised views or horizontal partitioning.
Before you start make sure you know what you're optimisation target is.

IBM Informix Dynamic Server supports a feature that allows you to add optimizer directives to pre-existing SQL when it is executed (without modifying the application). Look up 'external directives' at the Informix web site for more information (or Google 'site:ibm.com informix external directives').

Related

Maximum hits on a table in MySQL [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need to do some analysis of table usage within my MySQL system. Can anyone point me in the right direction on a method for identifying which table has been queried most often in a given time-period i.e. if there are 30 tables, I want to know which table is accessed most.
You should use pt-table-usage to analyze the general query log. It will out put nice information about table usage (as long as you're not using stored procedures or stored functions cause those will be missed).
Enable query logging temporarily while your application is running and review the log. It can have some performance impact, so you don't want to leave it permanently enabled.

Does MYSQL has Support for NOSQL [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I want to know does mysql support nosql. i have gone through the MySQL Cluster which supports the noSQL, its very confusing. So, i want to knw whether we can integrate NoSQL with MySQL and are there any tutorials on that if possible.
NoSQL databases are not built primarily on tables, and generally do not use SQL for data manipulation.
NoSQL does not use SQL as its query language. NoSQL database systems arose alongside major Internet companies which had challenges in dealing with huge quantities of data with which conventional RDBMS solutions could not cope.
This should answer your question, since MySQL is a conventional RDBMS, uses SQL for data manipulation and it's based on tables.
tl;dr: No, it doesn't.

Very slow querying in Access, Can a SQL server do any better [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am working on MSAccess to quickly load the data and perform some analysis.
Since the data exceeds over 200,000 records, it gets really very slow and takes for ever or never returns a result. I know that this is expected.
Does installing a SQL server (freely availalbe) like MySQL do better in this scenario?
(even for a million similar records)
I cannot ask for paid software to perform analysis.
You're not talking about a whole lot of records. Installing SQL Lite won't do much for you if the query you are using is not optimized for performance. I recommend attempting to optimize your query and/or increasing the query timeout so results can be returned. Indexing your tables will also slightly improve performance, but the query optimization is the big thing.

how is mysql working? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have basic knowledge in mysql. But I want more. I mean, "If I enter a query, how was the mysql server processing it and put the result", like that.
What I exactly want, how does mysql server read .frm file?
Anyone refer me the link for that. Thank you in advance.
You will need to look into the Execution plan to know how the RDBMS works internally, try this as a starting point: Understanding the Query Execution Plan
Everytime you try writing a query, just issue the following command and see
Explain <select statement>
This by default gives you the elaborate details of what is going to happen when you actually execute a query. Very helpful in debugging as well as improving the performance of queries.
Try to get information from below link
http://ece.ut.ac.ir/dbrg/seminars/AdvancedDB/Fall%202008/hashemi/Project_MySQL_Benchmark/References/MySQL%20Conceptual%20Architecture.pdf

What's the fastest way to search through a MySQL database containing billions of records? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I've been looking for a very fast and efficient way to search a database of an enormous size without using anything other than PHP and Mysql. What would be some options I could use?
The exact same way you would do it if you had 100's of rows. That's what indexes are for.
The most you can do is pay attention to the design of the tables, indexing strategy, and throw enough hardware at the solution.
If there was a silver bullet that anyone could answer in a paragraph or two here that applied universally (since you didn't give any insight to your table structure), don't you think it would already be built into MySQL?
The good news is that you will probably find that for most searches MySQL will do the job just fine even on massive databases.