Re: WHERE 1=2 with performance nightmares



Del Murray wrote:

I havent ever bothered to see what profiler does with "prepare" but
it would be interesting to see what tdataset says to the database to
"prepare" a sql statment. How could the tdataset possibly get
metadata if it doesn't somehow communicate with the database ?

It depends on the DB API. In the case of IB, a Prepare is one network
hop, but executing a kludgy statment to get precisely the same
information is three (prepare, execute, fetch). Worse, the execute may
have substantial overhead as the server searches for the record you
knew at the outset could never exist. Some other DB APIs may work
differently.

When you prepare only, you don't need the nonsense WHERE clause, and
you can get the metadata information you're asking for. So yes, you do
need to talk to the DB server, but you don't have to blather, as it
were...

--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: http://support.borland.com/entry.jspa?externalID=293
.



Relevant Pages

  • Re: Cool things you can do with Delphi
    ... >> To have code completion I am using MyGeneration to make classes for ... it's a matter of completing the metadata ... change in database to be reflected in code. ... TDataSet descendants to objects from DataExplorer and when an object from DE is ...
    (borland.public.delphi.non-technical)
  • Re: question?
    ... > question about the fedora project. ... If something like that (meaning the built in database ... of getting transactions to span filesystems. ... This is the metadata problem, or rather, series of problems. ...
    (Fedora)
  • Re: Question regarding to store file system metadata in database
    ... database, because the time used to read filelist and do statare ... considering the possibility of storing metadata in database. ... kernel boundary, I am expecting a moderate performance impact. ... the kernel to a userspace database process, ...
    (Linux-Kernel)
  • Re: Modelling objects with variable number of properties in an RDBMS
    ... >>> metadata during the early development stages, ... >>> then be used to build the final database system, ... >>> EAV model. ... > structured relational data model. ...
    (comp.databases.theory)
  • Re: Autopopulate
    ... Because you have already queried the database once to populate the ... So in each tab I have the subforms set up with the fields in a 1 row ... I orginally wrote an SQL statment but I keept getting "The record has ... The DLookup was easy to use and it didn't create the "The record has ...
    (microsoft.public.access.forms)