Witch Is Best?

Nov 10, 2007

Hello, i have a table called Mail, inside of this table are all the user mailmessages, now i want to display to the user how many messages he has, should i use:

SELECT count(*) FROM mailmessages WHERE (username = @UserName)

or

Should i create a table with a field named 'mailmessages' for every user, then in this table i update the 'mailmessages' whenever the user deletes or recieves a new message.

witch is the best option to use, lets assume that we have afew million mailmessages? performace gains? fastest?

(This will be displayed on every single page)

View 2 Replies


ADVERTISEMENT

Deploying A Database Witch Uses The Membership Tables

Jan 15, 2006

I have a website that uses an SQL 2005 Express database, with the added aspnet_users, aspnet_roles tables etc'  inside it.
(That is not an .mdf file, but in the databse itself)

Are there any guidelines for moving this kind of database to the deployment server, which also has SQL Express ?

Is it just a case of  detach + attach ?

View 1 Replies View Related

Read A SQ 6.5 DataBase From An Other Server In Witch SQL 6.5 Is Installed

Jan 17, 2002

Hi,
I have a SQL 6.5 DataBase in a product server and i copied the .dat an the .log from the product server to an other server (the test one). I want read and access this database on the test server on witch SQL Server 6.5 is installed whithout saving and restoring the database.
Can some body help me? please !
Thanks

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved