MySQL Forums
Forum List  »  Newbie

Re: select statement as per the column content
Posted by: Phillip Ward
Date: September 01, 2016 05:23AM

If you want to retrieve ...

+-------------+-----------+ 
| part_number | filename  | 
+-------------+-----------+ 
|         123 | abc       | 
|         123 | cvbsmdm   | 
|         123 | cbdjdk(9) | 
|         123 | asdre-01  | 
|         124 | qwe       | 
+-------------+-----------+

... then store it as such.

Move the job of "breaking up" that delimited string into the "load" process, with an insert for each [sub-]part.

insert into ABC_MASTER values ( 123, 'abc' ); 
insert into ABC_MASTER values ( 123, 'cvbsmdm' ); 
insert into ABC_MASTER values ( 123, 'cbdjdk(9)' ); 
insert into ABC_MASTER values ( 123, 'asdre-01' );

Working with delimited data is notoriously slow in most databases.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
Re: select statement as per the column content
September 01, 2016 05:23AM


Sorry, you can't reply to this topic. It has been closed.

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.