Article View: borland.public.cppbuilder.database.ado
Article #245Re: ado query vs ado table filter
From: Mike Collins
Date: Mon, 15 Jan 2007 11:02
Date: Mon, 15 Jan 2007 11:02
41 lines
2912 bytes
2912 bytes
SQL is probably faster and has less overheads. When you use a table, your application / ado requests ALL the data for that table. That information is shipped from the database, via ado, to your table within builder. Then you apply your filter in builder which iterates thought all the data client-side (you app) and removes any entries that do not match. This is ok but if you have thousands of records, it's a lot to ship over unnecessarily. My impression of table filters where simply a mechanic to provide GUI style filtering and ordering - not actually as a selective function. As far as I remember, filters can be toggles on and off so it makes it very useful for filtering as I have described. SQL on the other, relies on the database / engine to do the hard work and only returns the records that you actually want. However, SQL requests have overheads as well. The database engine must compile the sql request and execute it - this takes a finite about of time. This can be avoided by using stored procedures. Basically, it boils down to what exactly you are doing, how much data your are detailing with, what type of database you are communicating with (local Access/desktop database vs. sql server) and where you database is located or accessed from. HTH "basilis" <billaras1234@hotmail.com> wrote in message news:459487e5@newsgroups.borland.com... > hi all > > i want to view some specific data from a table in a database.there are 2 > ways: > a)pass an sql query in an adoquery component and get the results > b)make a adotable that connects to the table of the database and then use > the filter property to get the specific results > > is there any diffrence in the 2 ways?which one is faster? > should i use the second one if i need to make many queries in the same > table? > > thks >
Technical Details
Message-ID:
<45ab5f21$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!feeder02.uucp.at!feeder08.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mailReferences:
<459487e5@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,8b22b1d65c1c333d X-Google-Attributes: gid10698b,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Mike Collins" <its@TheBottomOfThePost.com> Newsgroups: borland.public.cppbuilder.database.ado References: <459487e5@newsgroups.borland.com> Subject: Re: ado query vs ado table filter Date: Mon, 15 Jan 2007 11:02:12 -0000 Lines: 43 Organization: SDA Ltd X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.2826 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2826 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 84.13.143.92 Message-ID: <45ab5f21$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1168858913 84.13.143.92 (15 Jan 2007 03:01:53 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!feeder02.uucp.at!feeder08.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail