I have an idea from outside the box, sort of.... This won't help you to 
find specific rows and it won't help you find data in InnoDB tables 
(unless you are running with --file-per-tablespace) but it may help you 
narrow your search to specific tables so you don't waste your time doing 
searches against every column in every table.

Try a file-level substring match on the files in your data directory (find 
files that contain 'ABC'). That will give you one or more hits per table. 
One for the data file that matches that pattern and one more for each 
index also containing that value. As I said, it's not precise or general 
but it could help you do a gross check to see if that substring exists at 
all in your data and in which files it may be.  You can narrow your search 
to particular file extensions if you don't want to search the table 
definitions (*.frm) or InnoDB indexes (*.myi)

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

"mel list_php" <[EMAIL PROTECTED]> wrote on 12/14/2005 09:39:51 AM:

> Hi Gleb,all,
> 
> Thanks for the reply, but unfortunatly we are still under 4.0 and I have 

> absolutely no control on that.(and I tried!!)
> 
> So basically except the external script no option?
> 
> Anything for the wildchars? :-(
> > > Last: I prefixed my tables by the step of the project they refer to, 
for
> > > ex step1_table,step1_table2, step2_table....
> > > Is it possible to use wildchars for the search, something like 
select *
> > > from step1_* ?
> 
> Thanks,
> melanie
> 
> >From: Gleb Paharenko <[EMAIL PROTECTED]>
> >To: mysql@lists.mysql.com
> >Subject: Re: global search
> >Date: Wed, 14 Dec 2005 12:48:22 +0200
> >
> >Hello.
> >
> > > It's probably possible to do a small script describing all the 
columns
> > > then building a query to search in, but I was wondering if there was
> > >an already existing mechanism.
> >
> >Another approach is not to use external scripts, but rather stored
> >routines and INFORMATION_SCHEMA databases in MySQL 5.0.
> >
> >
> >
> >
> >
> >
> >mel list_php wrote:
> > > Hi,
> > >
> > > I was wondering if there is any way to do a global search through 
all
> > > the tables in mysql? (not taking into account the performance issue)
> > >
> > > If for example I want to search "ABC" in all the columns of one 
table:
> > > select * from table where [whatever the column] like '%ABC%'
> > > or globally
> > > select * from [whatever the table] where [whatever the column] like 
> >'%ABC%'
> > > I think that if something like that is possible it should also send 
back
> > > the name of the table.
> > >
> > > Last: I prefixed my tables by the step of the project they refer to, 
for
> > > ex step1_table,step1_table2, step2_table....
> > > Is it possible to use wildchars for the search, something like 
select *
> > > from step1_* ?
> > >
> > > It's probably possible to do a small script describing all the 
columns
> > > then building a query to search in, but I was wondering if there was 
an
> > > already existing mechanism.
> > >
> > > Thanks,
> > > melanie
> > >
> > > _________________________________________________________________
> > > Be the first to hear what's new at MSN - sign up to our free
> > > newsletters! http://www.msn.co.uk/newsletters
> > >
> > >
> >
> >
> >--
> >For technical support contracts, goto 
https://order.mysql.com/?ref=ensita
> >This email is sponsored by Ensita.NET http://www.ensita.net/
> >    __  ___     ___ ____  __
> >   /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
> >  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
> >/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
> >        <___/   www.mysql.com
> >
> >
> >
> >
> >--
> >MySQL General Mailing List
> >For list archives: http://lists.mysql.com/mysql
> >To unsubscribe: 
> >http://lists.mysql.com/[EMAIL PROTECTED]
> >
> 
> _________________________________________________________________
> Are you using the latest version of MSN Messenger? Download MSN 
Messenger 
> 7.5 today! http://messenger.msn.co.uk
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 

Reply via email to