• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Fetch specification and raw SQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fetch specification and raw SQL


  • Subject: Fetch specification and raw SQL
  • From: Pascal Robert <email@hidden>
  • Date: Mon, 1 Aug 2005 10:02:16 -0400

Hi list,

I noticed that fetching seems to be very slow when doing a fetch of more than 1000 rows and one of the column is a CLOB. The slowdown is not only with EOF but also with SQLGrinder, so I guess it's Oracle JDBC driver who is slow since with SQLPlus, it's very fast.

So I created a Fetch Specification in my model so that the fetch will return all fields except the CLOB. Problem is, I have to use a raw SQL expression because the fetch is done with the CONTAINS operator. In EOModel, I specified 'Use Raw SQL Expression' and I tried thw following WHERE clause :

WHERE CONTAINS(AEA_TEXTE, '?', 0) > 0

and in my code :

NSMutableDictionary dictParamsRecherche = new NSMutableDictionary();
dictParamsRecherche.takeValueForKey(recMotClef,"AEA_TEXTE");
EOModelGroup modelGroup = EOModelGroup.defaultGroup();
EOFetchSpecification fs = modelGroup.fetchSpecificationNamed("fetchElementsExcluTexte","AaElementA rticle");
fs = fs.fetchSpecificationWithQualifierBindings(dictParamsRecherche);
NSArray elements = ec.objectsWithFetchSpecification(fs);


When doing the fetch, I get this error :

...WHERE CONTAINS(AEA_TEXTE, ?, 0) > 0 ">:
Next exception:SQL State:72000 -- error code: 1008 -- msg: ORA-01008: not all variables bound


So even if I assign a variable in the dictionary, I get an error. I also tried with 'aeaTexte' (EOF name) instead of AEA_TEXTE (Oracle name), I get the same error. Can you assign variable when using raw SQL expression ?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Fetch specification and raw SQL
      • From: Arturo Perez <email@hidden>
  • Prev by Date: Re: Tomcat build & deployment idiot's guide needed
  • Next by Date: Re: How To Use A Type Safe Enum As A Custom Value In EOF (was Re: (EOM) entity logic)
  • Previous by thread: Re: Tomcat build & deployment idiot's guide needed
  • Next by thread: Re: Fetch specification and raw SQL
  • Index(es):
    • Date
    • Thread