Jesse,

mysql> SHOW INDEX FROM mytable;

gives you all indexes for `mytable`; you can process the results with
perl.

Thomas Spahni

On Mon, 23 Aug 2004, Jesse Sheidlower wrote:

> I have a database where, most of the time, I'm bulk-loading
> data into new tables from an external source, several million
> rows at a time. For this purpose, I create the tables without
> indexes, and then add all my indexes after the load is done,
> for efficiency purposes.
>
> I'd now like to add the possibility of adding some data to the
> existing database. In this case, the indexes exist, and then
> the new data will be indexed as it goes in (which is OK given
> the relatively small amount of data to be processed this way).
>
> I'd like to be able to test for the existence of an index, so
> that after the bulk-load, I can see if there are indexes,
> there won't be any, and I can create them; but after an
> addition to an existing database, there will be indexes, and I
> won't create them.
>
> How do I do this? It wasn't clear from the manual, and I'm
> away from my books now so can't look there for advice. I'm
> using Perl to process the data, if there's a Perlish way of
> doing things that would be easier than SQL.
>
> Jesse Sheidlower
>
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to