medida do tempo de consulta em API C

2004-04-06 Thread Volnei Galbino
Olá pessoal,
 
Estou fazendo um trabalho em API C na área de otimização de consulta. O
meu problema esta em medir o tempo utilizado pela consulta. Estou usando
difftime(end,start) para avaliar o tempo, só ele está fornecendo o temo
em segundos, o que, na maioria das vezes, não é relevante. Como fazer
para que o tempo seja fornecido em centésimos de segundo, por exemplo?
Há como fazer isto?
 
Um abraço, 
 
Volnei Galbino


measuring the time used by the query

2004-04-06 Thread Volnei Galbino
Hello,

 I am making a work in API C in the area of query optimization. 
 My problem this in measuring the time used by the query.
 I am using difftime(end,start) to evaluate the time, only he is
supplying it fear  in seconds, which, most of the time, it is not
relevant. 
How to do so that the time is supplied in second hundredths, for
example?
Is there as doing this?

Regards,
 
Volnei Galbino


Query Optimization

2004-03-07 Thread Volnei Galbino
Hi,
 
Does anybody know where I can find information about query
optimization in MySQL? Of which the techniques that are used?
 
Regards,
 
Volnei Galbino
 


API C

2004-02-27 Thread Galbino
Hello,

I made a compilation test, to see how it works, and already the first
beginner problems came.

#include sys/time.h
#include stdio.h
#include mysql.h

int main(int argc, char *argv[]){
  MYSQL_RES *result;
  MYSQL_ROW  row;
  MYSQL *connection, mysql;
  int state;
  /* Conectando com MySQL */
  printf(Iniciando o MySQL!!!);
  mysql_init(mysql);
  connection =
mysql_real_connect(mysql,localhost,root,mysql,banco,0,NULL,0);
  if (connection ==  NULL){
 printf(Não conectado!!!);
 printf(mysql_error(mysql));
 return 1;
  }
  /* Close connection */
  mysql_close(connection);
  printf(\nSaindo! \n);
}

When I try to compile, with the command below, he says that cannot find
the - lsocket.  
Is the command correct?  
Which the problem?

[EMAIL PROTECTED] teste]# gcc -L/usr/local/mysql/lib/mysql
-I/usr/local/mysql/include/mysql -o teste teste.c -lmysqlclient -lnsl
-lsocket
/usr/bin/ld: cannot find -lsocket
collect2: ld returned 1 exit status
[EMAIL PROTECTED] teste]#

Removing the command - lsocket, the compilation is executed, however
when I will execute, appears the message, as shown below.

[EMAIL PROTECTED] teste]# gcc -L/usr/local/mysql/lib/mysql
-I/usr/local/mysql/include/mysql -o teste teste.c -lmysqlclient -lnsl
[EMAIL PROTECTED] teste]#

[EMAIL PROTECTED] teste]# ./teste
./teste: error while loading shared libraries: libmysqlclient.so.14:
cannot open shared object file: No such file or directory
[EMAIL PROTECTED] teste]#

what this happening?

Volnei Galbino.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]