You're very right, I tried it both ways:

With Flag, selecting 100 records from messageblks table: 0.0043 seconds.

With Self Join, 100 records: 0.0668 seconds. 

This of course doesn't include a search but it's the same idea. 

Thanks,
-Micah 

On Thursday 10 June 2004 10:05 am, Jesse Norell wrote:
> > Under these circumstances there would be a variety of self-joins and
> > various other queries that would perform the same function as the added
> > flag and index. You guys feel that this is more efficient?
>
>   I'm do database guru, but a single bit that's set once
> at message insertion time and an index to look up those
> blocks sure sounds more efficient than having the rdbms
> plan and performing those joins for every single query...
>
>
> --
> Jesse Norell
>
> [EMAIL PROTECTED] is not my email address;
> change "administrator" to my first name.
> --
>
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to