104 reputation
7
bio website
location
age
visits member for 2 years, 3 months
seen May 21 at 17:53

web develop, sports, music, all without Borders.


Mar
17
comment mysql optimize group by having count
@ypercube, this query cost 0.4596 sec. what can you see on it?
Mar
16
comment mysql optimize group by having count
@ypercube, SELECT ip FROM t2 group by t2 HAVING COUNT(ip) >10 Query took 0.0120 sec.
Mar
15
comment mysql optimize group by having count
select max(LENGTH(type)) as length from t1, 79; select count(DISTINCT(type)) from t1, 14. Thanks.
Mar
15
comment mysql optimize group by having count
@ypercube, page_type should be type some writing mistake. I have added an index on (ip, d_id) but Query took 2.5442 sec, slower than Up_One's answer.
Mar
14
comment mysql optimize group by having count
thx, now i use type varchar(100) DEFAULT NULL, cost 1.5050 sec, but still feel slow, 2 tables only with 70MB... I have another innodb table, 9.3GB some query only cost 0.4245 sec.
Feb
7
comment innodb DEPENDENT SUBQUERY very slow
great! I droped unique index. ALTER TABLE mytable ADD PRIMARY KEY (tindex, tn, col) ; and ALTER TABLE mytable ADD INDEX (date);. Now i only have 2 indexes. then use the same query, only 0.0052 s. I try to change any other search words, all of them below 0.1s. Make a right index is such important that cause different effection. I will Sstill test for a long time to see if it will cause another problem then mark a right anwser. Thanks.
Feb
7
comment innodb DEPENDENT SUBQUERY very slow
thanks for your anwser. I have added ALTER TABLE mytable ADD UNIQUE INDEX (tn,col,tindex);, ALTER TABLE mytable ADD INDEX (date); the query still slow. see the explain in my question.
Feb
4
comment innodb DEPENDENT SUBQUERY very slow
i added alter table mytable add index myindex (tn,col,tindex), but still slow.. sometimes some query words would cost 87.6206s.
Feb
1
comment innodb DEPENDENT SUBQUERY very slow
a bitter faster, 4.0612s, hope it would cost under 1s. thanks.