HELP :) Optimizing data file axs through adding indexes
Hi, I've a table which is read very often.. Simplified table structure: create table comments ( id int unsigned not null auto_increment primary key, datedate not null, comment varchar(255) not null index (date), index (comment) ); Ok I indexed the VARCHAR but I'll never use that key in a where statement. E.G: SELECT comment from comments group by date; I only indexed it in the hope mysql won't do a disk seek because the comment is allready in memory since it is a key. After looking in the mysql doc "How mysql handles indexes". I'm not sure if mysql will do it the way I expect it to. Thanks in advance Best regards, Patric de Waha - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
HELP :) Optimizing data file axs through adding indexes
Hi, I've a table which is read very often.. Simplified table structure: create table comments ( id int unsigned not null auto_increment primary key, datedate not null, comment varchar(255) not null index (date), index (comment) ); Ok I indexed the VARCHAR but I'll never use that key in a where statement. E.G: SELECT comment from comments group by date; I only indexed it in the hope mysql won't do a disk seek because the comment is allready in memory since it is a key. After looking in the mysql doc "How mysql handles indexes". I'm not sure if mysql will do it the way I expect it to. Thanks in advance Best regards, Patric de Waha - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Calculation of memory usage by indexes
Hi, I've got a question about the use of indexes. I've a site running quite good. I've such features like polls and all that usual stuff. I take the poll tables as example. POLLS: idpoll bigint unsigned not null auto_increment primary key, dtquestion varchar(255) not null, ANSWERS FOR THE POLLS: idanswer smallint unsigned not null auto_increment primary key, fipoll bigint unsigned not null, dtanswer varchar(255), USER VOTES: fiuser bigint unsigned not null, fipoll bigint not null, fianswer smallint unsigned not null, Ok I indexed all the fields in every table. I know that there won't be a lot of polls in one year (about 24). The same for the answers and votes. As I indexed everything, I suppose mysql doesn't need to access the drive (of course selects only) since everything is stored in memory. Now my question is how do i calculate the memory usage. I've a lot off stuff like the polls which i indexed to gain speed and decrease disk seeks. Thanks in advance Regards, Patric de Waha - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
!!! Mysql hangs after some days on FreeBSD 4.0I
Hi, I've mysql 3.23.32 running on FreeBSD 4.0. It runs a site with heavy traffic and heavy database interaction. After starting mysql it hangs after some days. Mysql server is still in the processlist, but it is not possible to connect to the sql server anymore. Therefor it is impossible to stop the server and rerun it without killing. Problem with threads?? I've found the following in the config.log generated by ./configure: - SNIP configure:5648: gcc -o conftest conftest.c -lz -lcrypt -lm 15 /tmp/ccF77967.o: In function `main': /tmp/ccF77967.o(.text+0xf): undefined reference to `pthread_create' configure: failed program was: #line 5641 "configure" #include "confdefs.h" #include pthread.h int main() { (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ; return 0; } configure:5662: checking for pthread_create in -lpthread configure:5673: gcc -o conftest conftest.c -lz -lcrypt -lm -lpthread 15 /usr/libexec/elf/ld: cannot open -lpthread: No such file or directory configure: failed program was: #line 5666 "configure" #include "confdefs.h" #include pthread.h int main() { (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ; return 0; } configure:5688: checking for pthread_create in -lpthreads configure:5697: gcc -o conftest conftest.c-lz -lcrypt -lm -lpthreads 15 /usr/libexec/elf/ld: cannot open -lpthreads: No such file or directory configure: failed program was: #line 5690 "configure" #include "confdefs.h" #include pthread.h int main() { pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ; return 0; } - SNIP I've no idea if this is important or not? I've made a script which reboots the server if connection to sql server fails. But this is not a solution :). Thanks in advance. Regards, Patric de Waha - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php