Can I measure the use of index?

2012-10-15 Thread Carlos Eduardo Caldi

Afternoon

Somebody knows how can I log or measure the index use ?

Thanks

Carlos
  

RE: Can I measure the use of index?

2012-10-15 Thread Carlos Eduardo Caldi

I want to count how many time one index was used during a day, do you now how 
to log it to count?



 Date: Mon, 15 Oct 2012 17:27:54 +0200
 From: h.rei...@thelounge.net
 To: mysql@lists.mysql.com
 Subject: Re: Can I measure the use of index?
 
 
 
 Am 15.10.2012 17:24, schrieb Carlos Eduardo Caldi:
  
  Afternoon
  
  Somebody knows how can I log or measure the index use ?
 
 explain select whatever from table where bla=value
 
  

RE: Problem with mytop

2010-08-18 Thread Carlos Eduardo Caldi

Hi Baron

This tool works better than mytop, you solved my problem, thanks a lot


Carlos



 Date: Tue, 17 Aug 2010 10:41:23 -0400
 Subject: Re: Problem with mytop
 From: ba...@xaprb.com
 To: mysql@lists.mysql.com
 
 Carlos,
 
 Have you tried innotop instead?  It's a better replacement for mytop.
 (I wrote it.)
 
 - Baron
 
 On Tue, Aug 17, 2010 at 8:50 AM, Carlos Eduardo Caldi
 ce_ca...@hotmail.com wrote:
 
 
  If sombody can help me I'll be gratefull
 
  I have a problem with mytop1.6 on Mandriva 2010.1, when I install it on a 
  Slave server mytop works,
  but when I install it on a Master Server don't works, don't display the 
  queries.
 
  I use mysql version 5.0.77
  and linux mandriva 2010.1
 
  Very Thanks
 
  Carlos Caldi -  DBA
 
 
 
 -- 
 Baron Schwartz
 Percona Inc http://www.percona.com/
 Consulting, Training, Support  Services for MySQL
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=ce_ca...@hotmail.com
 
  

Problem with mytop

2010-08-17 Thread Carlos Eduardo Caldi


If sombody can help me I'll be gratefull

I have a problem with mytop1.6 on Mandriva 2010.1, when I install it on a Slave 
server mytop works,
but when I install it on a Master Server don't works, don't display the queries.

I use mysql version 5.0.77
and linux mandriva 2010.1

Very Thanks

Carlos Caldi -  DBA   

RE: remote mysqldump to csv (--tab)

2010-04-28 Thread Carlos Eduardo Caldi

Hi

You can use on shell, connect at the client mysq -h (host or IP) -p(password)

and run the query:

SELECT a, b, c INTO OUTFILE '/tmp/result.txt'
  FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY ''
  LINES TERMINATED BY '\n'
  FROM test_table

more info see the link
http://dev.mysql.com/doc/refman/5.0/en/select-into-statement.html


Carlos Caldi



 Date: Wed, 28 Apr 2010 14:11:14 +0200
 From: ma...@psb.vib-ugent.be
 To: mysql@lists.mysql.com
 Subject: remote mysqldump to csv (--tab)
 
 Hi all,
 
 posted this in the backup list, but that one seems to be pretty dead, so i'll 
 try my luck again here:
 
 
 We're currently looking for a way to backup a pretty big mysql table to 
 a csv file. However, we don't want to allow the user ssh or file access 
 to the server, so it'd have to happen remotely. the --tab/-T option 
 allows exporting to csv, but not remotely.
 So we're looking for a way to have mysqldump store these files remotely, 
 on the client where mysqldump is executed.
 I've been looking up and down, only to find bad news, so I'm pretty sure 
 it's just not possible. I know there are ways to do this (little script 
 to convert the sql to csv, or pipe it all through sed), but we were just 
 wondering if we're really not overlooking a nifty option in mysqldump :-)
 
 Thanks in advance
 
 mavoo
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=ce_ca...@hotmail.com
 
  
_
O Internet Explorer 8 quer te ajudar a navegar seguro. Entre aqui para ler as 
dicas.
http://www.microsoft.com/brasil/windows/internet-explorer/?WT.mc_id=1500

RE: Trancate table from command line?

2010-03-17 Thread Carlos Eduardo Caldi

John

I think you can do this way on shell:
mysql -h db_server -u user -pPASSWORD DATABASE -e truncate table
table1








   Carlos Eduardo Caldi



 Date: Tue, 16 Mar 2010 14:12:42 -0700
 From: joli...@john-oliver.net
 To: mysql@lists.mysql.com
 Subject: Trancate table from command line?
 
 Is there a way to use mysqladmin (or mysql) to truncate a table as a
 one-off command from the command line?
 
 I have an issue with importing data from one database into another, but
 the second database might have columns that the first did not.
 
 On database 1, I use mysqldump to grab certain tables, and when I try to
 simply overlay those tables onto the new database, I get an error 
 
 ERROR 1062 (23000) at line 24: Duplicate entry '378-4' for key 1
 
 So we're thinking we should truncate the table first, but it appears
 this must be done manually in the mysql shell, which won't work... this
 operation needs to be scripted, or to be presented as one command line
 that can be copy-and-pasted.
 
 How can I do something like :
 
 mysqladmin -h db_server -u user -pPASSWORD DATABASE truncate table
 table1 ?
 
 -- 
 ***
 * John Oliver http://www.john-oliver.net/ *
 * *
 ***
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?unsub=ce_ca...@hotmail.com
 
  
_
Não deixe rastros ao navegar na Internet. Instale Grátis o Internet Explorer 8 
agora.
http://go.microsoft.com/?linkid=9707132

Copying to tmp table

2009-04-28 Thread Carlos Eduardo Caldi

Hi friends

I have a proble with Copying to tmp table with large tables, table have more 
than 3 million rows


EXPLAIN da Query :

Table : log0904
Type  : ref
Possible_keys : 
data_login_tplig,emp_grp_login_dtlig,grp_tiporeg_tipolig_dtlig,grp_dtlig_tplig,dtlig_num,grp_equipe_emp_dtlig
Key   : grp_tiporeg_tipolig_dtlig
Key_Len   : 7
Ref   : const
Rows  : 11554
Extra : Using where; Using temporary; Using filesort

I kill my queries with more than 60 seconds

Time (sec) : 75
User : logs
Maquina : 192.168.0.76:43947
BD  : logs
Thread  : 18811390
State   : Copying to tmp table
Query   : SELECT tipo_atendimento ,login_operador,sum(duracao_operador) as 
duracao_operador, count(*)as total FROM log0904 Where   grupo = '1172' AND  
data_ligacao = '2009-04-27' and hora_ligacao_ini between '17:00:00' and  
'17:59:59'  AND empresa = 'EXTREME-U'   AND tipo_registro in ('L','T') GROUP BY 
tipo_atendimento,login_operador


Somebody kwons a kind of tunning can I do?

Thanks


Carlos Caldi 




_
Descubra seu lado desconhecido com o novo Windows Live!
http://www.windowslive.com.br