8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 02:03:04 +01:00

Fixed CORE-3791: Performance degrades when actively working with databases bigger than the available RAM amount.

This commit is contained in:
dimitr 2012-03-27 07:08:25 +00:00
parent 724c72d114
commit c73cb3cf82
3 changed files with 5 additions and 9 deletions

View File

@ -161,9 +161,7 @@ void TempFile::init(const Firebird::PathName& directory,
temp /= strlen(NAME_LETTERS);
}
name += suffix;
DWORD attributes = FILE_ATTRIBUTE_NORMAL |
FILE_ATTRIBUTE_TEMPORARY |
FILE_FLAG_RANDOM_ACCESS;
DWORD attributes = FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_TEMPORARY;
if (doUnlink)
{
attributes |= FILE_FLAG_DELETE_ON_CLOSE;

View File

@ -114,15 +114,14 @@ static USHORT ostype;
#ifdef SUPERSERVER_V2
static const DWORD g_dwShareFlags = FILE_SHARE_READ; // no write sharing
static const DWORD g_dwExtraFlags = FILE_FLAG_OVERLAPPED |
FILE_FLAG_NO_BUFFERING |
FILE_FLAG_RANDOM_ACCESS;
FILE_FLAG_NO_BUFFERING;
#else
#ifdef SUPERSERVER
static const DWORD g_dwShareFlags = FILE_SHARE_READ; // no write sharing
static const DWORD g_dwExtraFlags = FILE_FLAG_RANDOM_ACCESS;
static const DWORD g_dwExtraFlags = 0;
#else
static const DWORD g_dwShareFlags = FILE_SHARE_READ | FILE_SHARE_WRITE;
static const DWORD g_dwExtraFlags = FILE_FLAG_RANDOM_ACCESS;
static const DWORD g_dwExtraFlags = 0;
#endif
#endif

View File

@ -1456,8 +1456,7 @@ static dba_fil* db_open(const char* file_name, USHORT file_length)
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL |
FILE_FLAG_RANDOM_ACCESS,
FILE_ATTRIBUTE_NORMAL,
0);
if (fil->fil_desc == INVALID_HANDLE_VALUE)