Click here to Skip to main content
15,921,113 members
Home / Discussions / Database
   

Database

 
Questionbackup the sql database Pin
Jassim Rahma8-Jan-09 4:59
Jassim Rahma8-Jan-09 4:59 
AnswerRe: backup the sql database Pin
Wendelius8-Jan-09 6:00
mentorWendelius8-Jan-09 6:00 
GeneralRe: backup the sql database Pin
Jassim Rahma8-Jan-09 11:33
Jassim Rahma8-Jan-09 11:33 
GeneralRe: backup the sql database Pin
Wendelius8-Jan-09 11:39
mentorWendelius8-Jan-09 11:39 
QuestionPartial Result Set or view retrieval Pin
20c8-Jan-09 4:24
20c8-Jan-09 4:24 
AnswerRe: Partial Result Set or view retrieval Pin
Wendelius8-Jan-09 4:52
mentorWendelius8-Jan-09 4:52 
QuestionRe: Partial Result Set or view retrieval Pin
20c8-Jan-09 5:15
20c8-Jan-09 5:15 
AnswerRe: Partial Result Set or view retrieval Pin
Wendelius8-Jan-09 5:57
mentorWendelius8-Jan-09 5:57 
20c wrote:
What is the possible problems caused by keeping the cursor open all the time


Some issues that come immediately to my mind:

  • the connection to the db must be open all the time so it's vulnerable to any possible network failures or degraded performance may cause timeouts thus closing the connection (don't know your environment so this may not be an issue for you)
  • When you hold the cursor open you use several resources on the database side since the database must hold the result set for you.
  • possible locking problems if the query holds S-locks, also degraded performance for the same reason


20c wrote:
By "offset" do you mean I need to memorize the last position and use it again the next call as a "bookmark" for the SQLFetchScroll method


Not actually the position as a row, since it may vary between calls. For example:
- you have 100 customers ordered by name
- you fetch in pages of 10 rows- you're on page 50-59
- the next page would be customers 60-69.

But what happens if let's say 20 customers have been added and they all start with letter A? If you remember the row position you would actually get the previous page where you've already been if you go forward.

What I meant is that you remember for example the key and the values in the ordering columns. If the customer has for example CustomerID as a primary key, next time when fetching you would query for customers in the same order but only rows starting the last customer you fetched previously.

The need to optimize rises from a bad design.My articles[^]

Questionhow to use SQL server Compact edition with VS2008 professional edition Pin
vsaratkar8-Jan-09 2:52
vsaratkar8-Jan-09 2:52 
AnswerRe: how to use SQL server Compact edition with VS2008 professional edition Pin
Wendelius8-Jan-09 2:57
mentorWendelius8-Jan-09 2:57 
GeneralRe: how to use SQL server Compact edition with VS2008 professional edition Pin
vsaratkar8-Jan-09 7:44
vsaratkar8-Jan-09 7:44 
GeneralRe: how to use SQL server Compact edition with VS2008 professional edition Pin
Wendelius8-Jan-09 8:07
mentorWendelius8-Jan-09 8:07 
Questiondisplay week number Pin
rajkumar.38-Jan-09 0:18
rajkumar.38-Jan-09 0:18 
AnswerRe: display week number [modified] Pin
Wendelius8-Jan-09 1:39
mentorWendelius8-Jan-09 1:39 
QuestionSql Server 2000 working improperly after a power cut Pin
Aman Bhullar7-Jan-09 20:52
Aman Bhullar7-Jan-09 20:52 
AnswerRe: Sql Server 2000 working improperly after a power cut Pin
Wendelius7-Jan-09 21:11
mentorWendelius7-Jan-09 21:11 
QuestionMs access Pin
aerosmith2k17-Jan-09 13:19
aerosmith2k17-Jan-09 13:19 
AnswerRe: Ms access Pin
Wendelius7-Jan-09 19:44
mentorWendelius7-Jan-09 19:44 
QuestionHow to split a .CSV file using a key Pin
ptrckmc2497-Jan-09 6:58
ptrckmc2497-Jan-09 6:58 
AnswerRe: How to split a .CSV file using a key Pin
Wendelius7-Jan-09 20:48
mentorWendelius7-Jan-09 20:48 
QuestionChinese characters in SELECT query Pin
Varghese Paul M7-Jan-09 2:10
Varghese Paul M7-Jan-09 2:10 
AnswerRe: Chinese characters in SELECT query Pin
Wendelius7-Jan-09 2:40
mentorWendelius7-Jan-09 2:40 
Questionretrieving data from several tables having same column name Pin
nripendra346-Jan-09 20:58
nripendra346-Jan-09 20:58 
AnswerRe: retrieving data from several tables having same column name Pin
SeMartens6-Jan-09 21:11
SeMartens6-Jan-09 21:11 
GeneralRe: retrieving data from several tables having same column name Pin
nripendra346-Jan-09 21:16
nripendra346-Jan-09 21:16 

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.