rang + order + limit optimization

2005-01-21 Thread Xuefer Tinys
i did "SELECT .. FROM table WHERE cateid=1 AND ctime>xx ORDER BY ctime DESC LIMIT 10" mysql can use INDEX(cateid,ctime), with NO filesort, this is very fast, cos LIMIT is used by optimization but now i have to query: cateid IN(1,2,3,4,5) now mysql use filesort, which is bad, cos it get all mat

1 query lock all others query

2003-08-14 Thread xuefer tinys
when i show processlist 1 of my queries is "sending data" (SELECT ...) while others queries (SELECT/UPDATE) is "locked" what's up? _ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn -- MySQL General Mailing List For list a

RE: 1 query lock all others query

2003-08-14 Thread xuefer tinys
i've once noticed it it has been 8 but i remove it now, problem still exists From: "Dathan Vance Pattishall" <[EMAIL PROTECTED]> To: "'xuefer tinys'" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]> Subject: RE: 1 query lock all others query Date: T

Re: 4.0.14 runs CPU usage up and eventually stop

2003-08-14 Thread xuefer tinys
you have similar problem as me i have my search box very slow, which eating so much cpu usage and if 1+ UPDATE wait for this query, and all other SELECT queries wait the UPDATE to be finished are u going to report this bug(high cpu usage) to bugs.mysql.net? From: "Cliff" <[EMAIL PROTECTED]> Repl

RE: 1 query lock all others query

2003-08-08 Thread xuefer tinys
i've noticed that, when a thread "sending data" an "update" is first "locked" then other "select" is locked From: "xuefer tinys" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: RE: 1 query lock all others query

RE: 1 query lock all others query

2003-08-07 Thread xuefer tinys
lects run at the same time. From: "Dathan Vance Pattishall" <[EMAIL PROTECTED]> To: "'xuefer tinys'" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: RE: 1 query lock all others query Date: Thu, 7 Aug 2003 10:59:46 -0700 For MYISAM tables

suggestion to max_connection

2003-03-15 Thread xuefer tinys
often, mysql in web services, there're many situation make a mysql connection idle for example: after php open mysql_pconnect(), finished a request, http start keep-alive or service other pages/images which do not require mysql connection however, the connection is still there, counted as "connec

question about mysql-4.x escaping with USE_MB

2003-02-28 Thread xuefer tinys
quoted from mysql-4.1/libmysql/libmysql.c = static ulong mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to, const char *from, ulong length) { const char *to_start=to; const char *end; #ifdef USE_MB my_bool use_mb_flag=use_mb(charset_info); #endif for (end=from+length;

Re: MySQL-4.x GBK Problem with Binary Data

2002-09-20 Thread xuefer tinys
x, u will never have such problem >From: Gerald Clark <[EMAIL PROTECTED]> >To: xuefer tinys <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: MySQL-4.x GBK Problem with Binary Data >Date: Fri, 20 Sep 2002 15:35:20 -0500 > >Binary data is binary data. >It do

MySQL-4.x GBK Problem with Binary Data

2002-09-20 Thread xuefer tinys
re-posting multibyte problem. does anyone have problem with binary data in MySQL-4.x using GBK charset or any other multibyte charset? inserting/updating/replacing the full description is in mysql mailing list archive, sent by me will not repost full desc until someone have or care this problem

RE: Japanese Charset

2002-09-20 Thread xuefer tinys
i'm sorry that i've not read through nor understand the whole thread >From: "Shashank Tripathi" <[EMAIL PROTECTED]> >To: "'xuefer tinys'" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>

Re: Japanese Charset

2002-09-20 Thread xuefer tinys
. ' ' . mysql_error()); return; } $row = mysql_fetch_row($res) or die('empty result'); dump_str('result', $row[0]); echo $row[0] === $str ? "* fine":"*** damn!"; } function dump_str($name, $str) {

Re: Japanese Charset

2002-09-20 Thread xuefer tinys
i'm sure mysql4.x have wrong algorithm to escape/unescape multibyte chars a multibyte is escaped while server read it, it maybe a pair of single byte or a pair of single byte escaped while server read it, it appears as multibyte both of these two situation make server unescape incorrectly i've po

Re: Aliasing all fields

2002-09-19 Thread xuefer tinys
he may want "SELECT table1.* prefix t1,table2.* prefix t2" which not seems to be supported. instead of "select table1.c1 as t1c1,table1.c2 as t1c2, table2.c1 as t2c2.." >From: z <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> >Subject: Re: Aliasing all fi

question about fulltext index

2002-09-17 Thread xuefer tinys
when will we be able to set our own word determination? when will mysql support multibyte fulltext index _ ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£http://www.hotmail.com/cn --

question about cached result

2002-07-30 Thread xuefer tinys
i'm using mysql 4.x it is said the query result is cached by mysql for next query i have a forum, having "post" table post: postid, title, content, postdate, clickcount and clickcount is increased when the post is viewed and a page to search post select * from post where title like "%word to ma

Re: question about varchars

2002-07-27 Thread xuefer tinys
i think it's just a length limiter in serversite (mysql server) string longer than this limit will be cut off allowing you to be lazy to cut it off in clientsite (mysql client) and also a way to indicate the string length, don't have to write a txt file for document >From: "toby -" >To: [EMAI

fail to insert BLOB data on multibyte charset MySQL server

2002-07-16 Thread xuefer tinys
failed to insert BLOB data on multibyte charset i'm using GBK charset. mysql 4.01 use PHP to insert, did addslashes before insert however, failed. i've read the mysql_escape_string() source code. noticed that, mb char is processed differently, but is it a must ? yes, php+libmysql is not up to d