#PARAN SILVERLIGHT#
  • Tistory
    • 관리자
    • 글쓰기
Carousel 01
Carousel 02
Previous Next

Entity Frame Work - Oracle : Direct path read problem(Full scan)

FRAMEWORK/LightSwitch 2013. 4. 25. 10:49

When  I don't use bind variance , the response time is acceptable.

query.Where(e => e.CUST_LOT == "AAA");

 

 

But  with a bind variance , obviously it spends too much time, which occurred time out error.

 

string Lotid = "AAA" ;

query.Where(e => e.CUST_LOT == Lotid );

 

 

 

I look into the query with Query tool, the plan is OK.

But When I check the session, there is a direct path read problem(Full path read).

 

 

I found a solution in the article below. use EntityFunctions.AsNonUnicode!

string Lotid = "AAA" ;

query.Where(e => e.CUST_LOT == EntityFunctions.AsNonUnicode(Lotid));

 

https://forums.oracle.com/forums/thread.jspa?messageID=10723648

 

[ the cause of this problem]

Because .NET string is Unicode, by default NVARCHAR2 is used in parameter binding for a string variable.
In WHERE clause, when one side is N type and the other side is not N type, data conversion occurs.
That may cause full table scan instead of using index.

EntityFunctions.AsNonUnicode() tells ODP.NET to treat a string as non Unicode. In this case, VARCHAR2
is used for the parameter binding. Because both sides are not N type, no more data conversion and
no more full table scan.

 

 

저작자표시 비영리 (새창열림)
블로그 이미지

파란실버라이트

To remember the time when I started learning Silver Light!

,

카테고리

  • Inforamtion Technology (281)
    • DESIGN PATTERN (33)
      • 실용주의 디자인패턴 (29)
    • SOFTWARE ENGINEERING (21)
      • Art Of Readable Code (12)
      • Object Oriented Programming (6)
      • TDD (2)
    • FRAMEWORK (22)
      • Spring.net (2)
      • LightSwitch (20)
    • PROGRAMING (58)
      • C# (20)
      • .NET (6)
      • HTML5 (7)
      • ASP.NET (9)
      • SILVERLIGHT (7)
      • Ruby On Rails (6)
    • PROJECT MANAGEMENT (10)
      • SW Version Management (7)
      • Schedulring Management (1)
    • BOOKS (18)
    • MOBILE APP (1)
      • SENCHA TOUCH (1)
    • SECURITY (5)
    • MES (1)
    • B2B (14)
      • WEBMETHODS (4)
    • ERP (53)
      • SAP/R/3 (51)
    • ABOUT TOOLS (2)
    • FUNDAMENT CONCEPT (21)
    • SOA BPM (22)
    • PORTFOLIO (0)

태그목록

  • 프로그래밍
  • 동시성
  • 병렬

최근에 받은 트랙백

글 보관함

링크

파란실버라이트

블로그 이미지

To remember the time when I started learning Silver Light!

LATEST FROM OUR BLOG

RSS 구독하기

LATEST COMMENTS

BLOG VISITORS

  • Total :
  • Today :
  • Yesterday :

Copyright © 2015 Socialdev. All Rights Reserved.

티스토리툴바