I have the following query: SELECT AVG(val) from floatTable WHERE tagindex IN(1,2,3,4) AND DateAndTime > \'$first_of_year\'
I need to get summary data from many many rows. The summary fields are counts of how many entries have each value for different fields. For example, a table with people\'s age, city, job, etc, the sum
I work at a fairly big website; we have ~400-500 million page views a month. We use PHP and MySQL. Currently our page flow works like this (semi pseudo code for clarity):
I got a spicy question about mysql... The idea here is to select the n last records from a table, filtering by a property, (possibly from another table). That simple.
From a performance point of view i开发者_开发问答s it the same doing this: select * from MYTABLEONE MT1
I have a problem with a 开发者_开发技巧quite slowish MYSQL query. I\'m building an AJAX menu with PHP and performance is really an issue. The query takes about 0,5 sec to complete, and i don\'t know h
Here I have a query like below: SELECT field FROM table WHERE value IN (\'val1\', \'val2\', \'val3\', ... \'valn\')
I use the following code to select popular news entries (by date) from the database: popular = Entry.objects.filter(type=\'A\', is_public=True).extra(select = {\'dpub\': \'date(dt_published)\'}).orde
I recently read somewhere that one of ways of tuning SQL query is that if it has too many joins, then do one join with fewer tables and cache the results in a temporary table, then do the rest of the
Is this the most efficient way to delete from DeletedProducts table where there are not references found in the ProductFileInfo table?