Re: indexing text fields possible?

2002-05-21 Thread Jeremy Zawodny

On Mon, May 20, 2002 at 04:33:41PM +0200, andy wrote:
 Thank you Egor for you reply.
 
 I did read about indexing text column on the mysql site. So I tryed
 to index my column like described. After 1 hour, I had to reboot my
 machine because there was no other way.

No other way?

You could have killed MySQL.

 All the cpu was bussy and it seemed to me to be an endless loop.

I doubt that it was endless.

 After rebooting I had to repair the file system (suse72) and
 tables. There was also a 130 MB tmp file I deleted.
 
 So what did I do wrong, or does it just take that long? The table
 contains about 40 MB of space.

How much data are you attempting to index, and how large is your
key_buffer?

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

-
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




Re: indexing text fields possible?

2002-05-20 Thread Egor Egorov

andy,
Sunday, May 19, 2002, 7:06:00 PM, you wrote:

a I am wondering if it would be anyhow possible to make a search on a mysql
a textfield faster. Right now the table contains 294000 entries and takes
a about 40 MB of space. Is there a way to apply a index with a resonable
a amount of disk space?

For TEXT column you can index only prefix of the column.

a I am also not so sure if I should use text or
a smalltext columns as the info may vary between 1 and 1000 chars. A query for
a LIKE 'test%' takes about 20 s right now.

There is no SMALLTEXT column type in MySQL :) There are TINYTEXT,
TEXT, MEDIUMTEXT and LONGTEXT.

TINYTEXT allows to store L+1 bytes, where L  256 bytes. So
it's not quite enough for you ...

Take a look at:
 http://www.mysql.com/doc/n/o/node_369.html
You can find info about storage requirements there.

a Thanx for any help on that,
a Andy





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   ___/   www.mysql.com



-
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




Re: indexing text fields possible?

2002-05-20 Thread andy

Thank you Egor for you reply.

I did read about indexing text column on the mysql site. So I tryed to index
my column like described. After 1 hour, I had to reboot my machine because
there was no other way. All the cpu was bussy and it seemed to me to be an
endless loop. After rebooting I had to repair the file system (suse72) and
tables. There was also a 130 MB tmp file I deleted.

So what did I do wrong, or does it just take that long? The table contains
about 40 MB of space.

Andy


- Original Message -
From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 3:59 PM
Subject: Re: indexing text fields possible?


 andy,
 Sunday, May 19, 2002, 7:06:00 PM, you wrote:

 a I am wondering if it would be anyhow possible to make a search on a
mysql
 a textfield faster. Right now the table contains 294000 entries and takes
 a about 40 MB of space. Is there a way to apply a index with a resonable
 a amount of disk space?

 For TEXT column you can index only prefix of the column.

 a I am also not so sure if I should use text or
 a smalltext columns as the info may vary between 1 and 1000 chars. A
query for
 a LIKE 'test%' takes about 20 s right now.

 There is no SMALLTEXT column type in MySQL :) There are TINYTEXT,
 TEXT, MEDIUMTEXT and LONGTEXT.

 TINYTEXT allows to store L+1 bytes, where L  256 bytes. So
 it's not quite enough for you ...

 Take a look at:
  http://www.mysql.com/doc/n/o/node_369.html
 You can find info about storage requirements there.

 a Thanx for any help on that,
 a Andy





 --
 For technical support contracts, goto https://order.mysql.com/?ref=ensita
 This email is sponsored by Ensita.net http://www.ensita.net/
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Egor Egorov
  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
 /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
___/   www.mysql.com



 -
 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



-
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




indexing text fields possible?

2002-05-19 Thread andy

Hi there,

I am wondering if it would be anyhow possible to make a search on a mysql
textfield faster. Right now the table contains 294000 entries and takes
about 40 MB of space. Is there a way to apply a index with a resonable
amount of disk space? I am also not so sure if I should use text or
smalltext columns as the info may vary between 1 and 1000 chars. A query for
LIKE 'test%' takes about 20 s right now.

Thanx for any help on that,

Andy


-
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