MySQL Forums
Forum List  »  Optimizer & Parser

Re: how to optimise query for 10+ millions records
Posted by: irek kordirko
Date: February 14, 2012 07:24AM

Azhar Rahi Wrote:
-------------------------------------------------------
> @irek .. These two tables are temporary tables,
> which are created when someone pass comma
> separated value to the stored procedure. This
> comma separated string is then converted to
> temporary tables. So I cant turn its field 'value'
> constraint to P.K.

Why you can't ?
Just modify your procedure:
CREATE TEMPORARY TABLE xxx(
  value varchar(100) PRIMARY KEY
);

If you don't want to use PK, then create an index on this field.
And remember to alter your temp tables specyfikations and make value column NOT NULL,

Options: Reply• Quote


Subject
Views
Written By
Posted
Re: how to optimise query for 10+ millions records
1586
February 14, 2012 07:24AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.