PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > Indexing question
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Indexing question

Réponse
 
LinkBack Outils de la discussion
Vieux 25/03/2008, 14h56   #1
J. Christian Hesketh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Indexing question

Hi,
I have created a rather large table containing about 16M records. Most
of the indexed fields are smallint, but there is one field that is a
text field that I am using fulltext indexing on. The total size of the
smallint indexes is only about 30 MB, but the fulltext index brings
the total index size to about 2 GB. My question is: When mysql adds
indexes to the keycache, does it add each index individually or does
it dump the entire .MYI file to the keycache. If it is the latter, I
should move the fulltext index to another table.
Thanks in advance,
Christian

--
J. Christian Hesketh M.Sc.
CEO - Ion Channel Media Group
2028 Harvard Avenue, Suite 103
Montreal, QC
CANADA H4A 2V9

Tel: +1(514)245-8107

http://www.IonChannelMedia.com
  Réponse avec citation
Vieux 25/03/2008, 15h11   #2
Arthur Fuller
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Indexing question

What is the size of the text field you're fulltext indexing? How often is
that index used? You might be best off to create a table containing only
that column and a PK that is equal to the PK in the original table. You
might also keep a portion of the text field (say 50 characters) in the
original table, for head-first indexing.

Arthur

On Tue, Mar 25, 2008 at 9:56 AM, J. Christian Hesketh <ionchannels@gmail.com>
wrote:

> Hi,
> I have created a rather large table containing about 16M records. Most
> of the indexed fields are smallint, but there is one field that is a
> text field that I am using fulltext indexing on. The total size of the
> smallint indexes is only about 30 MB, but the fulltext index brings
> the total index size to about 2 GB. My question is: When mysql adds
> indexes to the keycache, does it add each index individually or does
> it dump the entire .MYI file to the keycache. If it is the latter, I
> should move the fulltext index to another table.
> Thanks in advance,
> Christian
>
> --
> J. Christian Hesketh M.Sc.
> CEO - Ion Channel Media Group
> 2028 Harvard Avenue, Suite 103
> Montreal, QC
> CANADA H4A 2V9
>
> Tel: +1(514)245-8107
>
> http://www.IonChannelMedia.com <http://www.ionchannelmedia.com/>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=f...tful@gmail.com
>
>


  Réponse avec citation
Vieux 25/03/2008, 15h17   #3
J. Christian Hesketh
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Indexing question

The field has up to 1000 characters, usually well over 255. It is
searched constantly (2-3 times every second). The smallint values are
scanned up to 40 times a second. So, are you saying that the entire
MYI file is dumped into the keycache? If so, your suggestion to create
a separate table with PK and text field seems to be the only sensible
decision. Thanks in advance,
Christian

On Tue, Mar 25, 2008 at 10:11 AM, Arthur Fuller <fuller.artful@gmail.com> wrote:
> What is the size of the text field you're fulltext indexing? How often is
> that index used? You might be best off to create a table containing only
> that column and a PK that is equal to the PK in the original table. You
> might also keep a portion of the text field (say 50 characters) in the
> original table, for head-first indexing.
>
> Arthur
>
>
>
> On Tue, Mar 25, 2008 at 9:56 AM, J. Christian Hesketh
> <ionchannels@gmail.com> wrote:
>
> >
> >
> >
> > Hi,
> > I have created a rather large table containing about 16M records. Most
> > of the indexed fields are smallint, but there is one field that is a
> > text field that I am using fulltext indexing on. The total size of the
> > smallint indexes is only about 30 MB, but the fulltext index brings
> > the total index size to about 2 GB. My question is: When mysql adds
> > indexes to the keycache, does it add each index individually or does
> > it dump the entire .MYI file to the keycache. If it is the latter, I
> > should move the fulltext index to another table.
> > Thanks in advance,
> > Christian
> >
> > --
> > J. Christian Hesketh M.Sc.
> > CEO - Ion Channel Media Group
> > 2028 Harvard Avenue, Suite 103
> > Montreal, QC
> > CANADA H4A 2V9
> >
> > Tel: +1(514)245-8107
> >
> > http://www.IonChannelMedia.com
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:

> http://lists.mysql.com/mysql?unsub=f...tful@gmail.com
> >
> >

>
>




--
J. Christian Hesketh M.Sc.
CEO - Ion Channel Media Group
2028 Harvard Avenue, Suite 103
Montreal, QC
CANADA H4A 2V9

Tel: +1(514)245-8107

http://www.IonChannelMedia.com
  Réponse avec citation
Vieux 25/03/2008, 19h37   #4
Saravanan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut how to search apostrophes in sql

hi lists,

I want to count the number of rows containing "'" aphostrophe in a particular field. I tried with

select count(*) from table where field like "%'%"

i get only 0 counts. but I am sure that exists in many rows.

how to query them

Saravanan


__________________________________________________ __________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i...Dypao8Wcj9tAcJ
  Réponse avec citation
Vieux 25/03/2008, 19h51   #5
Phil
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how to search apostrophes in sql

You need to escape the apostrophe first

so

select count(*) from table where field like '%\'%'

On Tue, Mar 25, 2008 at 2:37 PM, Saravanan <suzuki_babu@yahoo.com> wrote:

> hi lists,
>
> I want to count the number of rows containing "'" aphostrophe in a
> particular field. I tried with
>
> select count(*) from table where field like "%'%"
>
> i get only 0 counts. but I am sure that exists in many rows.
>
> how to query them
>
> Saravanan
>
>
>
> __________________________________________________ __________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i...Dypao8Wcj9tAcJ
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=pchapman@nc.rr.com
>




--
build our city at http://free-dc.myminicity.com !

  Réponse avec citation
Vieux 25/03/2008, 23h19   #6
Saravanan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut updating innodb records locks all table

Hi Lists,

I am using the version 5.0.51a. After I compiled that It shows version as "5.0.51alog".

Here is the problem I am facing. I run a procedure to update the table. Which updates a innodb table. But when It updates all other sql statements are locked and I can see hundreds of sql statements in the processlist.

Any Ideas why this happens to me?

Saravanan


__________________________________________________ __________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h08.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,17027 seconds with 14 queries