[GENERAL] still on joining array/inline values was and is: design, ref integrity and performance

2009-10-28 Thread Ivan Sergio Borgonovo
On Tue, 27 Oct 2009 10:54:06 + Richard Huxton d...@archonet.com wrote: Association between email and password is just meant to build up a queue for mailing and there is no uniqueness constraint on (password, email) pair. create table pw_email( password varchar(16), email

Re: [GENERAL] still on joining array/inline values was and is: design, ref integrity and performance

2009-10-28 Thread Peter Hunsberger
On Wed, Oct 28, 2009 at 4:50 AM, Ivan Sergio Borgonovo m...@webthatworks.it wrote: To have the 3rd constraint I'd have a table: create table pw_res(  password varchar(16) primary key,  res int references resources (res) on delete cascade ); This comes handy for 2 reasons: - it helps me to

Re: [GENERAL] still on joining array/inline values was and is: design, ref integrity and performance

2009-10-28 Thread Ivan Sergio Borgonovo
On Wed, 28 Oct 2009 10:12:19 -0500 Peter Hunsberger peter.hunsber...@gmail.com wrote: The first approach requires a distinct/group by that may be expensive. The second one requires I keep in memory all the emails while the first statement run. Unless you're dealing with 100,000's of