On Sat, Jan 5, 2013 at 8:25 AM, Russ Michaels wrote:
> 2 simple solutions are.
>
> 1. Dont query all the data at all, instead provide a search form to get at
> specific records, which is usually much simpler thsn paging through
> hundreds or thousands of records.
> 2. Only query the primary keys
Another method, assuming you're using MS SQL Server (not sure how far
this goes back compatibility-wise) is to toss in the criteria for the
full search, but then to only pull back X rows:
WITH Results_Full AS (
SELECT Field1, Field2, Field3, ROW_NUMBER()
OVER (ORDER BY Field1)
Very slick. Thanks guys!
--Ben
On 1/5/2013 3:39 PM, =?ISO-8859-1?Q?Claude_Schn=E9egans wrote:
> >>2. Only query the primary keys, and then loop over that list grabbing x
> records at a time and doing a new query to get all rows for those keys.
>
> This is a pretty good method.
> I tested it o
Glad it helped. Also dont forget u.can cache the original primary key query
too.
Regards
Russ Michaels
www.michaels.me.uk
www.cfmldeveloper.com - Free CFML hosting for developers
www.cfsearch.com - CF search engine
On Jan 5, 2013 10:39 PM, <> wrote:
>
> >>2. Only query the primary keys, and the
>>2. Only query the primary keys, and then loop over that list grabbing x
records at a time and doing a new query to get all rows for those keys.
This is a pretty good method.
I tested it on a database containing about 45 records with a seach template.
I give a very loose criterion on purpos
Actually there are ways to step through a result set using database
functions so that you do bot store huge resultsets in memory, if you google
it then you will find some examples.
2 simple solutions are.
1. Dont query all the data at all, instead provide a search form to get at
specific records
That's what I suspected. Much appreciated.
--Ben
On 1/4/2013 6:40 AM, Dave Watts wrote:
>> A question came up recently with one of my client developers who is
>> potentially
>> returning a large # of rows from a query. The question was whether the
>> result
>> set is stored in memory or spoo
> A question came up recently with one of my client developers who is
> potentially
> returning a large # of rows from a query. The question was whether the result
> set is stored in memory or spooled to disk somewhere. I didn't know but
> assumed
> it was memory resident.
>
> Anyone know the
Hi,
A question came up recently with one of my client developers who is potentially
returning a large # of rows from a query. The question was whether the result
set is stored in memory or spooled to disk somewhere. I didn't know but
assumed
it was memory resident.
Anyone know the answer t
9 matches
Mail list logo