67 questions
0
votes
1
answer
65
views
Azure SQL Pricing Tiers - can we still reduce the Pricing Tier after creating a Memory Optimized Table? [closed]
One of our clients has a Azure SQL database running on a P1 Premium Pricing Tier.
I created a Memory Optimized table in this database, e.g.
CREATE
TABLE [dbo].[Foo]
([id] INT ...
0
votes
0
answers
104
views
Why Table Spool on MemoryOptimized table and how to suppress it?
I am in the middle of the road to achieving an optimized query for faster execution, or at least I hope so. I stumbled upon a pattern (it looks strange to me) in the execution plan, which seems to be ...
0
votes
1
answer
746
views
'TRANSACTION ISOLATION LEVEL is set to SNAPSHOT' error when using TransactionScope on Memory Optimised Table
In Memory disk setup on SQL Server with below up
snapshot_isolation_state
snapshot_isolation_state_desc
is_read_committed_snapshot_on
is_memory_optimized_elevate_to_snapshot_on
...
0
votes
0
answers
677
views
Memory Optimized table - Adding hash index with included fields
A number of indexes were dropped from a SQL Server 2017 memory-optimized table during a change a couple of months ago. Unfortunately it appears the source code for the original table is not available (...
1
vote
2
answers
3k
views
The current transaction attempted to update a record that has been updated since this transaction started. The transaction was aborted
I'm trying to update a table which is In-Memory OLTP. There is a scenario where we may have to update a same row in parallel. During concurrent update of a same record I am getting below reported ...
1
vote
0
answers
385
views
Cross-database query with memory memory-optimized tables
I am trying to tune a system by using memory optimized tables as a cache for frequently used data. The problem is that my system design has separate database (on the same server) siloed by core ...
1
vote
0
answers
252
views
How to return MEMORY OPTIMIZED table from UDF?
How to re-write the UDF returning table variable to the function returns memory-optimized type dbo.TypeOUT ?
DROP FUNCTION [dbo].[test01]
GO
CREATE FUNCTION [dbo].[test01] (@id int)
RETURNS @out ...
1
vote
1
answer
379
views
Conditional Unique Constraint on Memory Optimized Tables
I am trying to keep integrity in a MEMORY OPTIMIZED table I have. In that table is a foreign key (uniqueidentifier) that points to another table and an Active flag (bit) denoting whether the record is ...
5
votes
1
answer
2k
views
How do you change the DURABILITY option on an existing memory-optimized table in SQL Server 2016?
I want to change the DURABILITY of a memory-optimized table in SQL Server 2016 from SCHEMA_AND_DATA to SCHEMA_ONLY.
The Microsoft documentation suggests that the following ALTER TABLE statement ...
26
votes
5
answers
19k
views
ALTER TABLE DROP INDEX failed on a table that isn't memory optimized
I'm trying to drop an index created on a table, but I get this error -
The operation 'ALTER TABLE DROP INDEX' is supported only with memory optimized tables.
I need to remove this index in order to ...
0
votes
0
answers
190
views
Fetching records that are not being updated SQL Server
I have an API that multiple processor requests work from. The job of the the API is to select records from a memory optimized table and mark the status assigned and hand it off to the requester. I ...
2
votes
1
answer
427
views
Populate schema_only table with some initial values
Is it possible populate a schema_only table (with some initial values) when the database starts, e.g. by invoking a stored procedure?
The logic that normally operates on this table would be more ...
0
votes
0
answers
653
views
How to create a copy of table that is in-memory optimized?
I have a table T1 that I created in-memory using the in-memory procedure in SQL Server 2016. Now, I want to create a copy of the same table T1 into another table T2 which should have the same schema i....
0
votes
0
answers
233
views
Alternative to partitioning in SQL Server 2016 on memory optimized tables
I have a script in existing SQL Server 2012 to delete old/expired sessions using partitioning. Data is moved from the source table to the staging table on basis of weekday partition and truncate ...
1
vote
1
answer
947
views
Faster SQL temp table and table variable by using memory optimization
Scenario C in This Microsoft Doc describes how temp tables scoped to a connection can be replaced with Memory-Optimized Tables. The scheme uses a Filter Security Policy which calls a function to ...
1
vote
1
answer
217
views
Memory optimized data base and table variable
After looking into different groups/discussions i didn't found any satisfactory answer of my question,
I have around 1.5 TB size Sql server database in production, and there is also a transaction ...
0
votes
2
answers
5k
views
cross database query on sql server 2014
I have a database with a memory optimized table. I want to archive this table in another database. I want to write an stored procedure to do that.
I am implemented below sample from 1 and 2 ...
1
vote
1
answer
1k
views
Updating Memory Optimized Table [duplicate]
I have a memory-optimized table in SQL Server 2017 called "User".
I'm going to update a row as:
using (var context = new MyDbEntities())
{
var user = context.Users.Single(p => p.UserId == 1);
...
0
votes
0
answers
201
views
The function nchar is not supported with natively compiled modules
Error : The function nchar is not supported with natively compiled modules.
How I can use Nchar() Function in native Function?
my query is :
Declare @Input NVARCHAR(MAX)
DECLARE @Output NVARCHAR(MAX)...
4
votes
1
answer
825
views
Queries to in Memory table are slower than to disk based
I'm working with an already built table which I must migrate to a memory optimized one. The following is a clone from the disk based. Both have the same structure with the exception that the disk ...
0
votes
2
answers
244
views
Best Hive SQL query for this
i have 2 table something like this. i'm running a hive query and windows function seems pretty limited in hive.
Table dept
id | name |
1 | a |
2 | b |
3 | c |
4 | d |
Table time (build with heavy ...
1
vote
1
answer
1k
views
SQL Server Hekaton Reclaim Memory Used by Dropped Memory-Optimized Tables
I'm using
Microsoft SQL Server Enterprise: Core-based Licensing (64-bit) Version
12.0.4100.1
I have a code which creates many non-durable memory-optimized tables, uses them for some things, and ...
1
vote
2
answers
754
views
Memory optimized table - Partially load data into memory
Is it possible for a memory optimized table in SQL server to have part of its data in memory and the rest on disk?
I have a requirement to load the last 3 months' data into memory, and the rest
of ...
0
votes
2
answers
1k
views
Unable to call into C compiler when creating memory optimized table in SQL Server 2014
I am trying to create my first memory optimized table using SQL Server 2014. I first created the necessary file group and file without issue. But when I try to create a simple table using
CREATE ...
3
votes
2
answers
14k
views
"There is insufficient system memory in resource pool 'default' to run this query" during execution of stored procedure
I am using a stored procedure which loops through a cursor. Within the cursor I am calling a natively compiled stored procedure. The natively compiled stored procedure does an insert into a memory-...