Click here to Skip to main content
15,893,644 members
Home / Discussions / Database
   

Database

 
QuestionDatabase Login Pin
Bonsta26-Aug-07 8:47
Bonsta26-Aug-07 8:47 
AnswerRe: Database Login Pin
Marek Grzenkowicz26-Aug-07 21:43
Marek Grzenkowicz26-Aug-07 21:43 
QuestionWhy the Column from Type BigInt must have name [Size] in SQL 2000 to work well ?!! Pin
I Believe In GOD26-Aug-07 5:39
I Believe In GOD26-Aug-07 5:39 
AnswerRe: Why the Column from Type BigInt must have name [Size] in SQL 2000 to work well ?!! Pin
Michael Sync26-Aug-07 17:44
Michael Sync26-Aug-07 17:44 
QuestionPleaes help me with this query Pin
Meysam Mahfouzi26-Aug-07 4:22
Meysam Mahfouzi26-Aug-07 4:22 
AnswerRe: Pleaes help me with this query Pin
Colin Angus Mackay26-Aug-07 5:35
Colin Angus Mackay26-Aug-07 5:35 
GeneralRe: Pleaes help me with this query Pin
Meysam Mahfouzi26-Aug-07 11:32
Meysam Mahfouzi26-Aug-07 11:32 
GeneralRe: Pleaes help me with this query Pin
Colin Angus Mackay26-Aug-07 11:44
Colin Angus Mackay26-Aug-07 11:44 
Maysam Mahfouzi wrote:
I just wonder if you think this is a heavy query and can be rephrased to be performed faster?


Not really. It isn't that complex. If the table contains a lot of data then you might want to index some of the columns if you need it to perform very fast. (I'd probably go with creating one index containing the columns in the WHERE clause, "KeyId" and "value")

However, don't just blindly create indexes. You must understand how they work and how they affect your database. INSERTs, UPDATEs and DELETEs will be slower with indexes. This is because on each of these commands the index needs to be changed as well as the table. So, if you do a lot of data changes then indexes may slow the overall performance of your database.

If your table consists of just the three columns you showed earlier then there probably isn't much advantage to an index. One of the reasons indexes are faster is that they pull a small amount of data from an index then look up the full row when needed. If the index is similar in size to the full row there isn't anything to be gained. And sometimes it may actually hurt performance.


-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.

Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits


My website

GeneralRe: Pleaes help me with this query Pin
Meysam Mahfouzi28-Aug-07 3:25
Meysam Mahfouzi28-Aug-07 3:25 
AnswerRe: Pleaes help me with this query Pin
Michael Potter27-Aug-07 5:41
Michael Potter27-Aug-07 5:41 
GeneralRe: Pleaes help me with this query Pin
Meysam Mahfouzi28-Aug-07 3:08
Meysam Mahfouzi28-Aug-07 3:08 
GeneralRe: Pleaes help me with this query Pin
Colin Angus Mackay28-Aug-07 6:55
Colin Angus Mackay28-Aug-07 6:55 
GeneralRe: Pleaes help me with this query Pin
Meysam Mahfouzi28-Aug-07 21:38
Meysam Mahfouzi28-Aug-07 21:38 
QuestionProblem with cursor Pin
Developer61126-Aug-07 4:06
Developer61126-Aug-07 4:06 
AnswerRe: Problem with cursor [modified] Pin
John-ph26-Aug-07 20:10
John-ph26-Aug-07 20:10 
AnswerRe: Problem with cursor Pin
John-ph26-Aug-07 21:08
John-ph26-Aug-07 21:08 
Questionconnect to MYSQL database located on web Pin
Rupesh Kumar Swami25-Aug-07 23:19
Rupesh Kumar Swami25-Aug-07 23:19 
QuestionHow to drop builtin\administrators account from sql server Pin
Developer61125-Aug-07 22:39
Developer61125-Aug-07 22:39 
AnswerRe: How to drop builtin\administrators account from sql server Pin
Mark Churchill26-Aug-07 18:07
Mark Churchill26-Aug-07 18:07 
GeneralRe: How to drop builtin\administrators account from sql server Pin
Developer61126-Aug-07 19:35
Developer61126-Aug-07 19:35 
GeneralRe: How to drop builtin\administrators account from sql server Pin
Burnsys229-Aug-07 4:35
Burnsys229-Aug-07 4:35 
Questionoutput to struct Pin
ginjikun25-Aug-07 6:53
ginjikun25-Aug-07 6:53 
AnswerRe: output to struct Pin
Christian Graus26-Aug-07 0:30
protectorChristian Graus26-Aug-07 0:30 
QuestionProblem with piece of code Pin
ChrisFarrugia25-Aug-07 6:12
ChrisFarrugia25-Aug-07 6:12 
AnswerRe: Problem with piece of code Pin
Colin Angus Mackay25-Aug-07 6:51
Colin Angus Mackay25-Aug-07 6:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.