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

Re: what does Rows_examined mean exactly?

2004-07-25 Thread tinys xuefer
hrm.. but i tried SELECT * FROM post ORDER BY postdate DESC LIMIT 771297, 30 postdate is not primary key but just an INDEX it still examined 771297 rows From: Michael Stassen <[EMAIL PROTECTED]> To: tinys xuefer <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: what does Rows_e

what does Rows_examined mean exactly?

2004-07-25 Thread tinys xuefer
slow.log: # Query_time: 14 Lock_time: 0 Rows_sent: 30 Rows_examined: 771327 SELECT * FROM `post` LIMIT 771297, 30; i dp have privmary key on table `post` does 'Rows_examined: 771327' means mysqlserver read through those 771327 rows to get 30 rows? it takes 14 seconds! possible to show 'Rows_exami

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

Re: Re: Re: Re: Re: how to prevent from Creating Large Numbers ofTables ???

2002-06-18 Thread Xuefer
ue, 2002-06-18 at 19:02, Xuefer wrote: >> sorry, i can't quite get what u meant >> dunno how to do as u said >> >> > You might want to associate the attributes with categories >> > in a different table. This way you could put an attribute >>

Re: Re: Re: Re: how to prevent from Creating Large Numbers of Tables ???

2002-06-18 Thread Xuefer
ory table as well. > >On Tue, 2002-06-18 at 15:42, Xuefer wrote: >> thx for replying >> >> it's really a new course for me >> >> option 1 will still make lots of tables >> >> does option 2 waste of space ? >> cause 2 id with only 1 value >

Re: Re: Re: how to prevent from Creating Large Numbers of Tables ???

2002-06-18 Thread Xuefer
bute: DELETE FROM Attribute where attributeID=$id DELETE FROM AttributeValue where attributeID=$id >On Tue, 2002-06-18 at 12:28, Xuefer wrote: >> SET? >> i know how to use SET >> but... attribute of products is value >> such as Size Weight Color and so on >> the pro

ideas to mysql replication

2002-06-18 Thread Xuefer
why the current implement of replication is so difficult to make use of? a few days recently, i though of mysql replication and got an ideas - idea 1: i leant it from IRC server no "master" and "slave" servers have equal rights and specify 1 and only 1 server as REGISTER SERVER(may be

Re: Re: how to prevent from Creating Large Numbers of Tables ???

2002-06-18 Thread Xuefer
SET? i know how to use SET but... attribute of products is value such as Size Weight Color and so on the problem is, different CATE of products have different bunch of attribute >On Tue, 2002-06-18 at 00:53, Xuefer wrote: >> (mailbox full? repost) >> >> I have many p

bug in file "ibmysql_r/libmysql.c"

2002-04-16 Thread xuefer
* repl-parse-query */ options->rpl_parse = 1; break; or change "static const char *default_options[]=.." and those comments; >Submitter-Id: xuefer >Originator:personal >Organization: 123 >MySQL support:

Re: hello, i need help, about mysql MISSING charsets

2002-04-16 Thread Xuefer
sn't work? client complain about missing charset #28 (gbk) Xuefer [EMAIL PROTECTED] 2002-04-16 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/

hello, i need help, about mysql MISSING charsets

2002-04-14 Thread Xuefer
acter set and is not specified in the 'c:\mysql\\share\charsets\Index' file - i've also compiled in linux with charset gbk gbk should work, but it didn't why? either with gb2312 does MultiByte Charset support broken? Xuefer