Last post Sep 11, 2018 10:40 AM by PatriceSc
Sep 10, 2018 06:14 PM|kanmai|LINK
I have a table with 25+Million Records. The table structure as follows
I have to Select only Orphan Records That is not a parent or child.
With above example, I need the result as follows
WITH T1 as(
FROM TestTable as tab1
Where NOT EXISTS
Select distinct ParentID FROM TestTable
INNER JOIN T1 ON T1.ID = v.ID
ParentID = ''
giving System.OutOfMemoryException Exception when running this against 25 million records
Any Help Appreciated.
Sep 10, 2018 06:46 PM|limno|LINK
CREATE TABLE TestTable(
ID INTEGER NOT NULL PRIMARY KEY
,NAME VARCHAR(5) NOT NULL
,DATE DATE NOT NULL
INSERT INTO TestTable(ID,NAME,PARENTID,DATE) VALUES
Select * from TestTable
WHERE ID IN (
Select ID from TestTable
WHERE ParentID is null
Select ParentID FROM TestTable
drop table TestTable
Sep 11, 2018 10:00 AM|wmec|LINK
This issue occurs because the computer does not have sufficient memory to complete the requested operation. A limitation in SQL Server 2000 Reporting Services causes certain parts of report processing to be memory bound. For example, query result processing
and object model rendering are memory bound. The computer does not have sufficient memory to complete the requested operation when one or more of the following conditions are true:
A report is processed in two stages. The two stages are execution and rendering. This issue can occur during the execution stage or during the rendering stage. If this issue occurs during the execution stage, this issue most likely occurs because too much
memory is consumed by the data that is returned in the query result. Additionally, the following factors affect memory consumption during the execution stage:
If this issue occurs during the rendering stage, the cause is related to what information the report displays and how the report displays the information. For example, the following factors affect memory consumption during the rendering stage:
Sep 11, 2018 10:40 AM|PatriceSc|LINK
You mean you are loading 25+ million rows in a System.Data.Dataset object ? Usually you try to load just the data needed at a particular point. What would you do with those rows then ? Or this is really a db side error ?
IMO it's best to quote the exact error message (and at least some of the call stack) to make sure about what happens. For now it seems a client side error rather than really a db side error.
Edit: this is an SSMS error maybe ? See https://support.microsoft.com/en-us/help/2874903