Re: Help optimize query.

2014-12-01 Thread shawn l.green
Hello Mimko, Sorry for the late reply. I had a bunch of work to take care of before vacation, then there was the vacation itself. :) On 11/13/2014 2:34 PM, Mimiko wrote: Hello. I have this table: > show create table cc_agents_tier_status_log: CREATE TABLE "cc_agents_tier_status_log" ( "i

Re: Help optimize query.

2014-11-15 Thread Mimiko
On 15.11.2014 01:06, Peter Brawley wrote: Let's see the results of Explain Extended this query, & result of Show Create Table cc_member_queue_end_log. cc_member_queue_end_log is not of interest, it is used just as a series of numbers. It may be any table with ids. I've changed a bit the quer

Re: Help optimize query.

2014-11-14 Thread Peter Brawley
Let's see the results of Explain Extended this query, & result of Show Create Table cc_member_queue_end_log. PB - On 2014-11-13 1:34 PM, Mimiko wrote: Hello. I have this table: > show create table cc_agents_tier_status_log: CREATE TABLE "cc_agents_tier_status_log" ( "id" int(10) unsign

Help optimize query.

2014-11-13 Thread Mimiko
Hello. I have this table: > show create table cc_agents_tier_status_log: CREATE TABLE "cc_agents_tier_status_log" ( "id" int(10) unsigned NOT NULL AUTO_INCREMENT, "date_log" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, "cc_agent" varchar(45) NOT NULL, "cc_agent_tier_status_id" tinyint(3)

Re: Optimize query help.

2011-03-15 Thread Michael Dykman
The OR conditions require a full table scan everytime this is called. You didn't say how many rows you had, nor if there were indexes on your various phone_xxx fields. If you do, you should get some value by approaching it as a UNION select count(id)from ( select id from leads where phone_work

Optimize query help.

2011-03-15 Thread Paul Nowosielski
Dear all, I have a query that takes a rather long time and was wondering if there is anyway to optimize it. Normally we removing duplicate records by phone number. This query takes about a second and it really slows down the process when we are importing several 1000 records a day. Here is

Re: Optimize Query Output

2004-11-20 Thread Michael Stassen
GH wrote: I have the following query: SELECT A.`AttID` , S.`SessionDate` , P.LastName, P.FirstName, A.`Present` FROM `Attendance` A, Sessions S, Participants P WHERE S.SessionID = A.`Session` AND P.Part_ID = A.`Participant` GROUP BY P.LastName, P.FirstName, A.Present, A.AttID Selecting S.SessionDat

Optimize Query Output

2004-11-19 Thread GH
I have the following query: SELECT A.`AttID` , S.`SessionDate` , P.LastName, P.FirstName, A.`Present` FROM `Attendance` A, Sessions S, Participants P WHERE S.SessionID = A.`Session` AND P.Part_ID = A.`Participant` GROUP BY P.LastName, P.FirstName, A.Present, A.AttID I would like to have the outpu

Re: need help optimize query

2004-11-19 Thread SGreen
Your original query (implicit INNER JOINs): SELECT teu.name, eca.owner_id, ece.value FROM typed_enterprise_unit teu, e_contact_association eca, e_contact_entry ece WHERE teu.unit_id=eca.owner_id and eca.entry_id=ece.entry_id and eca.type_id=68 and (teu.ty

need help optimize query

2004-11-18 Thread Elim Qiu
Dear list, i have some small tables but for some reason the mysql took very long to find the results. my query looks like below and mysql'e explain is attached for better format. Thanks for your help! select teu.name, eca.owner_id, ece.value fromtyped_enterprise_unit teu, e_contact_as

Re: Optimize query and/or db structure, FullText search + sort by other fields

2004-11-06 Thread Aleksandr Guidrevitch
Hi All, The temporary table wasn't a better idea, the problem is that if the search returns 1500+ rows ( on a 20 000 recs table), the population of temporary table is still slow making no significant difference. Well, I'm in a strange situation as for the moment. I've created helper tables, eg to p

Re: Optimize query and/or db structure, FullText search + sort by other fields

2004-11-05 Thread Santino
Hi, Try to add an index on join fields ( search.lot_id, exchange_rate.currency_id,lot.currency_id) Your query can not use an index to sort because MySql can use only 1 index to search and sort and your sort is a function so it scans result rows and then it sorts the working table. Santino At 1

Re: Optimize query and/or db structure, FullText search + sort by other fields

2004-11-05 Thread SGreen
I found your query hard to understand, however it seems the optimizer could read it just fine. I VERY MUCH dislike using the comma-separated list of table names to declare INNER JOINS. I think it allows me too much opportunity to accidentally create a Cartesian product by accidentally forgettin

Optimize query and/or db structure, FullText search + sort by other fields

2004-11-05 Thread Aleksandr Guidrevitch
Hi All, this was already posted on mysql forum "preformance", but forums are really slow, so sorry for the crosspost :) My objective is to implement quick, really quick complex fulltext search with 'order by' (< 2 seconds). The actual table I'd like to search is `lot`. I've created 2 helper table

Optimize query help

2004-10-13 Thread Chris Blackwell
Hi, We log all sessions on our webserver to a table, and then periodically run a batch process to analyze the visitors ip addresses to determine the city/region/country of origin. we use MySQL 4.1.1-alpha-standard-log on Redhat AS, installed from the mysql RPM. The query below takes about 1 seco

Re: Optimize query, avoid 'using temporary'

2003-04-02 Thread Eric Persson
Stefan Hinz wrote: The query I used looks like this: SELECT files.file_id, filename FROM access, files WHERE directory_id="0" AND lang_id="1" AND ( files.file_id=access.conn_id AND access.group_id IN (1) AND access.class_id="4" AND class_tbl="file" ) group by file_id order by filename; Just a

Re: Optimize query, avoid 'using temporary'

2003-04-01 Thread Stefan Hinz
Eric, > I have a query which I did several months ago, it recently caught my > attention since it seems to be very slow when done a lot of times, which > causes a very loaded server. > The query I used looks like this: > SELECT files.file_id, filename FROM access, files WHERE > directory_id="0

Optimize query, avoid 'using temporary'

2003-04-01 Thread Eric Persson
Hi, I have a query which I did several months ago, it recently caught my attention since it seems to be very slow when done a lot of times, which causes a very loaded server. Its a webbased filesystem, which stores access/file information in mysql, the actual files are stored on disk. The prob

Re: Optimize query, avoid 'using temporary'

2003-04-01 Thread Bruce Feist
Eric Persson wrote: CREATE TABLE access ( class_id int(10) unsigned NOT NULL default '0', group_id int(10) unsigned NOT NULL default '0', class_tbl char(10) NOT NULL default '', conn_id int(10) unsigned NOT NULL default '0' ) TYPE=MyISAM; CREATE TABLE files ( file_id int(10) unsigned NO

RE: Optimize query, avoid 'using temporary'

2003-04-01 Thread Andrew Braithwaite
tax easily. It should run way faster then.. Cheers, Andrew -Original Message- From: Eric Persson [mailto:[EMAIL PROTECTED] Sent: Tuesday 01 April 2003 19:02 To: MySQL List Subject: Optimize query, avoid 'using temporary' Hi, I have a query which I did several months ago, i

Optimize query, avoid 'using temporary'

2003-04-01 Thread Eric Persson
Hi, I have a query which I did several months ago, it recently caught my attention since it seems to be very slow when done a lot of times, which causes a very loaded server. Its a webbased filesystem, which stores access/file information in mysql, the actual files are stored on disk. The problem

optimize query

2002-11-11 Thread Harald Kirschner
Hi Folks, facts: i have a statistic-database for a php/mysql content-monitoring program. the problem: the tables have many entries, and so i need to optimize all my queries, which join many tables to one result. i tried any solution, but i only got minimal here is one query: SELECT content.mem