How do i improve this mysql query for performance
i have a slow query in php on a large mysql MyISAM table:
select p.*, m.*, d.*
from datafeeds as d,
products as p left outer join meta as m on p.mykey = m.mykey
where p.datafeed_id = d.id and "keyword"
The table has 3 Million records and this search query is taking up to 50 seconds in some cases.
I would be more than thankful for a hint to optimize the query and/or table and indexes.
datafeed_id has index BTREE mykey_index has index BTREE
I tryed EXPLAIN EXTENDED:
EXPLAIN EXTENDED SELECT p. * , m. * , d. * FROM datafeeds AS d, products AS p LEFT OUTER JOIN meta AS m ON p.mykey = m.mykey WHERE p.datafeed_id = d.id AND "keyword"
id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra
1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | Impossible WHERE
I was wondering, does compressing an image (jpg, png) improve the performance of an web application based on html5 canvas, or does it only improve user experience becasue the load time it less.
I have this JQuery script that is looking at some DIVs and getting the image sizes and setting the div size according to the images. I had a JQuery script to get all the DIVs and loop to each image an
What are some things I can do to improve query performance of an oracle query without creating indexes? Here is the query I'm trying to run faster: SELECT c.ClaimNumber, a.ItemDate, c.DTN, b.FilePath
I have a report with four charts, that each have one dataset behind it, the performance on the db side is very good, however I waist nearly 95% of the time on the rendering step of the report. Are the
Hi here i have a query and i need to improve the performance of this query.Can anyone suggest me like how to convert the clustered index scan to index seek. DECLARE @now DateTime; DECLARE @lastweeksta
I have a lot of records in table. When I execute the following query it takes a lot of time. How can I improve the performance? SET ROWCOUNT 10 SELECT StxnID ,Sprovider.description as SProvider ,txnID
The following is a part of a bigger PHP script which adds or disables users from a MySQL database using a CSV file and a client id field as input. There are two tables involved, users and users_client
I was given the task of improving the performance of a stock market charting software that uses SWT's GC to draw the charts. The chart drawing needs to be improved because the charts sometimes are red
I have created an sql table where I have indexed files on disk. There are over 1 million records on the table. I have added indexes for ext and size, but it still takes over a minute to execute this q
I made a client application that uses HTTP to communicate with a Python 2 server using a simple API. The server uses SQLAlchemy's ORM quite extensively to serve the data for those HTTP requests. The p
I am trying to develop a Recursive Extractor. The problem is , it is Recursing Too Much (Evertime it found an archive type) and taking a performance hit. So how can i improve below code? My Idea 1: Ge
We are facing performance related problem with select query. We have reports table which contains approximate 2 Crore (20 million) records. When we are executing simple count(*) from to check count,
I Would like to write the below query in a better & efficient way any help? SELECT a.assetnum as Asset, a.assettag as Asset_Tag, a.manufacturer as Manufacturer, a.serialnum as Serial, a.descriptio
I was trying to improve the performance by following these steps, I already have my model and i dont have and edmx files and the steps asked to have one so i created one and followed these steps the
I'm checking for existing of a row in in_fmd, and the ISBN I look up can be the ISBN parameter, or another ISBN in a cross-number table that may or may not have a row. select count(*) from in_fmd i wh
As the number of JOINS in Hive query is increasing, the query is running in multiple stages and taking a lot of execution time. How to improve the query performance. Are there any paramters to be set?
i have this sql query: SELECT Frage_ID FROM Session_Fragen WHERE ( Userantwort1 = 0 AND Userantwort2 = 0 AND Userantwort3 = 0 AND Userantwort4 = 0 AND Userantwort5 = 0 ) AND Session_ID = 17898 ORDER B
In my binary to text decoding application (.NET 2.0) I found that the line: logEntryTime.ToString(dd.MM.yy HH:mm:ss:fff) takes 33% of total processing time. Does anyone have any ideas on how to mak
I am trying to figure out how to have two IN statements. I'm trying to get something like this, although I don't know how to use both of the nested select statements. $query_row=mysql_query( SELECT
I have the following query: SELECT DATE_FORMAT( DATE, '%M' ) AS MONTH , DATE_FORMAT( DATE, '%y' ) AS year, DEVICE, COUNT( * ) AS cnt FROM users GROUP BY year, MONTH , DEVICE I'm trying to order it by
Looking to improve this mysql select statement for a search query: Select * from table WHERE ( user = '$search_query' OR user LIKE '$search_query %' OR keyword LIKE '$search_query' OR tag LIKE '$sear
I ran into an interesting SQL problem today and while I came up with a solution that works I doubt it's the best or most efficient answer. I defer to the experts here - help me learn something and imp
I have the following piece of PHP code for matching a birth year: $pattern = /20\d\d/; $exp = BORN ON: Friday, June 11, 2001 ; $match = preg_match($pattern,$exp, $matches); echo $matches; This
I think FORCE SEEK can improve the performance of SELECT query, but wondering if FORCE SCAN can also improve performance of query. Can someone explain with example?
How do I improve the query with OR, AND clause? explain select fileds from table_name where (fldlp>='2012-09-15 13:00:34' and fldlp<='2012-09-16 06:00:02') or (flexp>='2012-09-15 13:00:34' an
If I dump SPECIFIC data into a new table for performance reasons (reduce overall query times) and SELECT from just the reduced dataset, isn't that performance bottleneck still there because then THAT
While I have more experience with MySQL, i'm fairly new to SQLite and apparently there is no support in it's syntax for IF() statements, so I was wondering, how can I do this query which works great i
SELECT avg(con_hits) as avg_hits FROM content WHERE con_type = 1 AND con_posttime < $twelve_hrs_ago AND con_refresh = 0 ORDER BY con_posttime DESC LIMIT 100 I would like it to go to the first reco
How do i increase the performance of below linq query? While running it, it threw an error of System.OutOfMemoryException. Note: I have a lot of records in XrmContext.sun_POSSet entity var a = (from t
I am using google places autocomplete suggestions in my application. It is working fine but i want to improve its performance. When user types a place, it is giving a suggestions after a long delay or
I have an query like: SELECT id as OfferId FROM offers WHERE concat(partycode, connectioncode) = ? AND CURDATE() BETWEEN offer_start_date AND offer_end_date AND id IN (121211, 123341,151512,5145626
What I want to do is order question by similarities/likeness then get results from Result table based on their points from Point table. Example: query = 'Germany location' I have the following tables
Hi I have a table with very large data,can the sharding improve the query performance?
I'm trying to import a large amount of data into a core data store on the iPhone. I'm using a SQLite backing for the core data store. It seems to be taking way longer than I would expect it to. I've t
I would like to select all rows where field A is 'x' and field B is one of 'w', 'y' or 'z'. A and B are both strings, and I would like case to be ignored.
Recently I had this question, and everything worked properly until I sent it to my server at DreamHost. The query bellow seems to take too long to execute and I can't figure out why so many rows are p
My scenario is : WebApp -> WCF Service -> EDMX -> Oracle DB When I want to bind grid I fetch records from Oracle DB using EDMX i.e LINQ Query. But, this degrades performance as multiple layer
With reference to SQL Query how to summarize students record by date? I was able to get the report I wanted. I was told in real world the students table will have 30 Millions of records. I do have in
I am using jquery mobile 1.3.2 for my Phonegap Build app. I would like to improve the performance of the slider input : because when you try to slide it on a phone, it is very slow, as I do a lot of U
I have a ML database with a few tens of thousands of documents in it, and a query that returns some simple calculated values for either all or a subset of those documents. The document count has grown
I have a query that look like this: $sql = UPDATE tbl SET amt_field='amt_field+1' WHERE username=' .mysql_real_escape_string($_SESSION['username']). '; mysql_select_db('db',$con); mysql_query($sql
I have the following query SELECT a.id, b.id from table1 AS a, table2 AS b WHERE a.table2_id IS NULL AND a.plane = SUBSTRING(b.imb, 1, 20) AND (a.stat LIKE f% OR a.stat LIKE F%) Here is the outpu
I was wondering if there is a performance gain between a SELECT query with a not very specific WHERE clause and another SELECT query with a more specific WHERE clause. For instance is the query : SELE
This function takes around 1.2 seconds to execute. I am unable to understand why? Is it because of the inner joins? If yes, then how can i improve the execution speed? I am using Microsoft Enterprise
I want to improve the performance of the following query. SELECT DISTINCT StringId FROM translations WHERE status = 1 AND TranslationId IN ( SELECT Max(TranslationId) FROM translations WHERE languageI
Im in a dilema on which one of these methods are most efficient. Suppose you have a query joining multiple tables and querying thousand of records. Than, you gotta get the total to paginate throughout
I have 10000 of records which needs to retrieve on single user click. Currently its giving me results very slow, i have to wait for long time. Is there anyway how to improve retrieve results using hib
I have been asked to help with performance issue of a SQL server installation. I am not a SQL Server expert, but I decided to take a look. We are using a closed source application that appears to work
Guys I have this query, that gets a keyword, and searches in DB for an array of articles to show according that keyword query results, then I need to fetch information about those articles according t