Re: Query size
You can use .. then use This way you can parse thru the WDDX if you are interested in specific thing in there... .. but I think Len() works on binary data as well: Jp On Friday, November 8, 2002, at 06:29 PM, Srimanta wrote: > Would be happy to get a CF solution to the problem. > Dont really want to work at db end for the solution. > What about other platforms-- ASP--PHP? > (Iam probably going off the track.) > > Thanks > Srimanta > - Original Message - > From: "Srimanta" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Friday, November 08, 2002 6:21 PM > Subject: Re: Query size > > >> Thanks, >> I am using MS SQL. >> >> Srimanta >> - Original Message - >> From: "Jeff" <[EMAIL PROTECTED]> >> To: "CF-Talk" <[EMAIL PROTECTED]> >> Sent: Thursday, November 07, 2002 9:13 PM >> Subject: RE: Query size >> >> >>> What database are you using? Does this have to be a ColdFusion >>> solution? Or can you work it on the Database end? >>> >>> Jeff >>> >>> -Original Message- >>> From: Srimanta [mailto:mail@;designshop.co.nz] >>> Sent: Friday, November 08, 2002 6:34 PM >>> To: CF-Talk >>> Subject: Re: Query size >>> >>> >>> Thanks, >>> The best solution would have been to get the exact query size. >>> Unfortunately average values will not do the job in this case. Dont >>> think writing it to a file and then using CF directory to get the >>> file >>> size will work either as more than one user can run multiple queries >>> simultaneously. Locking is an option. Will have to experiment and see >>> how it works. Would be happy to see Macromedia provide a function to >>> get >>> query size in the future versions of CF. I think I am in trouble as I >>> promsed my client that it can be easily done... >>> >>> Kind Regards, >>> Srimanta >>> >>> - Original Message - >>> From: "Mosh Teitelbaum" <[EMAIL PROTECTED]> >>> To: "CF-Talk" <[EMAIL PROTECTED]> >>> Sent: Thursday, November 07, 2002 3:26 PM >>> Subject: RE: Query size >>> >>> >>>> Well, it's not in KBs or MBs, but you can use queryName.RecordCount >>>> to >>> >>>> determine the number of results in the record. Multiply that by >>>> some >>>> multiple and you have an "average" (perhaps?) size. Sort of. 8^) >>>> >>>> -- >>>> Mosh Teitelbaum >>>> evoch, LLC >>>> Tel: (301) 625-9191 >>>> Fax: (301) 933-3651 >>>> Email: [EMAIL PROTECTED] >>>> WWW: http://www.evoch.com/ >>>> >>>> >>>>> -Original Message- >>>>> From: Srimanta [mailto:mail@;designshop.co.nz] >>>>> Sent: Friday, November 08, 2002 2:56 PM >>>>> To: CF-Talk >>>>> Subject: Query size >>>>> >>>>> >>>>> Hi Forum, >>>>> >>>>> I need a way to display the query size (in Kb or Mb) in a Cold >>>>> Fusion application and then use it to bill a client. Unusual >>>>> requirement. Had a quick look through the list of Cf >>>>> functions ... didnt seem to find one or did I miss ? >>>>> Is there a cold fusion function to get the size of query >>> resultsets? I >>>>> need to be able to display / output the size and then use it for >>> billing >>>>> purposes. >>>>> I know one can know the query size and time in the debugging >>> environment, >>>>> but this is for the client to view. >>>>> >>>>> any Help would be much appreciated. >>>>> >>>>> Thanks >>>>> Srimanta >>>>> - Original Message - >>>>> From: "Michael Dinowitz" <[EMAIL PROTECTED]> >>>>> To: "CF-Talk" <[EMAIL PROTECTED]> >>>>> Sent: Thursday, November 07, 2002 2:22 PM >>>>> Subject: Re: sorry if repost >>>>> >>>>> >>>>>> Someone said that the HoF server was hitting them with what >>>>> looked like a >>>>>> DoS attack. I couldn't find the problem and took the server down >>>>>> to >>> look >>>>&g
Re: Query size
> S. Isaac Dealey wrote: >> Or ... >> #len("#valuelist(myquery.textcolumn)##valuelist(myquery.a >> nothertextco >> lumn)#")# ... > That will measure the length in characters, not in bytes. >> each character is a byte > Not necessarily. Ah yes -- I forget about double-byte character sets... each character is a byte in ISO Latin ... :) Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Re: Query size
S. Isaac Dealey wrote: > Or ... > #len("#valuelist(myquery.textcolumn)##valuelist(myquery.anothertextco > lumn)#")# ... That will measure the length in characters, not in bytes. > each character is a byte Not necessarily. Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: Query size
Yes, I was hastily pounding away at the keyboard and realized this after the sending the note. Concatenating the NVARCHAR fields and calling DATALENGTH on the concatenated product will produce the same result, however, it get's tricky once you start throwing in NTEXT fields and binary data. Thanks for Catching that! Jeff -Original Message- From: Paul Hastings [mailto:paul@;tei.or.th] Sent: Thursday, November 07, 2002 10:56 PM To: CF-Talk Subject: Re: Query size > SELECT foo, bar, hum, DATALENGTH(foo + '' + bar + '' + hum) AS bytes shouldn't that be SELECT foo, bar, hum, DATALENGTH(foo) + DATALENGTH(bar)+DATALENGTH(hum) AS bytes --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.410 / Virus Database: 231 - Release Date: 10/31/2002 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
Re: Query size
> SELECT foo, bar, hum, DATALENGTH(foo + '' + bar + '' + hum) AS bytes shouldn't that be SELECT foo, bar, hum, DATALENGTH(foo) + DATALENGTH(bar)+DATALENGTH(hum) AS bytes --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.410 / Virus Database: 231 - Release Date: 10/31/2002 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: Query size
You can use the DATALENGTH function in SQL Server to calculate the size of each field (in bytes) that is returned. SELECT foo, bar, hum, DATALENGTH(foo + '' + bar + '' + hum) AS bytes Looking at the results, it's basically the length of all the characters returned (including white space) multiplied by two. You could also do something like the following SELECT CategoryID, CategoryName, CategoryDescription FROM tblCategories #bytecount# Bytes But then you are still manually setting this up for each query. I'd look at using the Database myself and setting up a series of Stored Procs to handle this... You could even insert the running tally into a billing table as you go. HTH, Jeff -Original Message- From: Srimanta [mailto:mail@;designshop.co.nz] Sent: Friday, November 08, 2002 7:22 PM To: CF-Talk Subject: Re: Query size Thanks, I am using MS SQL. Srimanta - Original Message - From: "Jeff" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, November 07, 2002 9:13 PM Subject: RE: Query size > What database are you using? Does this have to be a ColdFusion > solution? Or can you work it on the Database end? > > Jeff > > -Original Message- > From: Srimanta [mailto:mail@;designshop.co.nz] > Sent: Friday, November 08, 2002 6:34 PM > To: CF-Talk > Subject: Re: Query size > > > Thanks, > The best solution would have been to get the exact query size. > Unfortunately average values will not do the job in this case. Dont > think writing it to a file and then using CF directory to get the file > size will work either as more than one user can run multiple queries > simultaneously. Locking is an option. Will have to experiment and see > how it works. Would be happy to see Macromedia provide a function to > get query size in the future versions of CF. I think I am in trouble > as I promsed my client that it can be easily done... > > Kind Regards, > Srimanta > > - Original Message ----- > From: "Mosh Teitelbaum" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Thursday, November 07, 2002 3:26 PM > Subject: RE: Query size > > > > Well, it's not in KBs or MBs, but you can use queryName.RecordCount > > to > > > determine the number of results in the record. Multiply that by > > some multiple and you have an "average" (perhaps?) size. Sort of. > > 8^) > > > > -- > > Mosh Teitelbaum > > evoch, LLC > > Tel: (301) 625-9191 > > Fax: (301) 933-3651 > > Email: [EMAIL PROTECTED] > > WWW: http://www.evoch.com/ > > > > > > > -Original Message- > > > From: Srimanta [mailto:mail@;designshop.co.nz] > > > Sent: Friday, November 08, 2002 2:56 PM > > > To: CF-Talk > > > Subject: Query size > > > > > > > > > Hi Forum, > > > > > > I need a way to display the query size (in Kb or Mb) in a Cold > > > Fusion application and then use it to bill a client. Unusual > > > requirement. Had a quick look through the list of Cf functions ... > > > didnt seem to find one or did I miss ? Is there a cold fusion > > > function to get the size of query > resultsets? I > > > need to be able to display / output the size and then use it for > billing > > > purposes. > > > I know one can know the query size and time in the debugging > environment, > > > but this is for the client to view. > > > > > > any Help would be much appreciated. > > > > > > Thanks > > > Srimanta > > > - Original Message - > > > From: "Michael Dinowitz" <[EMAIL PROTECTED]> > > > To: "CF-Talk" <[EMAIL PROTECTED]> > > > Sent: Thursday, November 07, 2002 2:22 PM > > > Subject: Re: sorry if repost > > > > > > > > > > Someone said that the HoF server was hitting them with what > > > looked like a > > > > DoS attack. I couldn't find the problem and took the server down > > > > to > look > > > > more. I havn't heard back from the guy to know if the problem > > > was fixed or > > > > not (I think it was a change in his anti-spam routing, but) > > > > > > > > As for the question, look at these functions: > > > > > > > > From bin to dec (converts a string to a decimal integer using > > > the radix - > > > > second attribute) > > > > #InputBaseN(1010, 2)# > > > > > > > >
Re: Query size
Would be happy to get a CF solution to the problem. Dont really want to work at db end for the solution. What about other platforms-- ASP--PHP? (Iam probably going off the track.) Thanks Srimanta - Original Message - From: "Srimanta" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, November 08, 2002 6:21 PM Subject: Re: Query size > Thanks, > I am using MS SQL. > > Srimanta > - Original Message - > From: "Jeff" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Thursday, November 07, 2002 9:13 PM > Subject: RE: Query size > > > > What database are you using? Does this have to be a ColdFusion > > solution? Or can you work it on the Database end? > > > > Jeff > > > > -Original Message- > > From: Srimanta [mailto:mail@;designshop.co.nz] > > Sent: Friday, November 08, 2002 6:34 PM > > To: CF-Talk > > Subject: Re: Query size > > > > > > Thanks, > > The best solution would have been to get the exact query size. > > Unfortunately average values will not do the job in this case. Dont > > think writing it to a file and then using CF directory to get the file > > size will work either as more than one user can run multiple queries > > simultaneously. Locking is an option. Will have to experiment and see > > how it works. Would be happy to see Macromedia provide a function to get > > query size in the future versions of CF. I think I am in trouble as I > > promsed my client that it can be easily done... > > > > Kind Regards, > > Srimanta > > > > - Original Message - > > From: "Mosh Teitelbaum" <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Thursday, November 07, 2002 3:26 PM > > Subject: RE: Query size > > > > > > > Well, it's not in KBs or MBs, but you can use queryName.RecordCount to > > > > > determine the number of results in the record. Multiply that by some > > > multiple and you have an "average" (perhaps?) size. Sort of. 8^) > > > > > > -- > > > Mosh Teitelbaum > > > evoch, LLC > > > Tel: (301) 625-9191 > > > Fax: (301) 933-3651 > > > Email: [EMAIL PROTECTED] > > > WWW: http://www.evoch.com/ > > > > > > > > > > -Original Message- > > > > From: Srimanta [mailto:mail@;designshop.co.nz] > > > > Sent: Friday, November 08, 2002 2:56 PM > > > > To: CF-Talk > > > > Subject: Query size > > > > > > > > > > > > Hi Forum, > > > > > > > > I need a way to display the query size (in Kb or Mb) in a Cold > > > > Fusion application and then use it to bill a client. Unusual > > > > requirement. Had a quick look through the list of Cf > > > > functions ... didnt seem to find one or did I miss ? > > > > Is there a cold fusion function to get the size of query > > resultsets? I > > > > need to be able to display / output the size and then use it for > > billing > > > > purposes. > > > > I know one can know the query size and time in the debugging > > environment, > > > > but this is for the client to view. > > > > > > > > any Help would be much appreciated. > > > > > > > > Thanks > > > > Srimanta > > > > - Original Message - > > > > From: "Michael Dinowitz" <[EMAIL PROTECTED]> > > > > To: "CF-Talk" <[EMAIL PROTECTED]> > > > > Sent: Thursday, November 07, 2002 2:22 PM > > > > Subject: Re: sorry if repost > > > > > > > > > > > > > Someone said that the HoF server was hitting them with what > > > > looked like a > > > > > DoS attack. I couldn't find the problem and took the server down > > > > > to > > look > > > > > more. I havn't heard back from the guy to know if the problem > > > > was fixed or > > > > > not (I think it was a change in his anti-spam routing, but) > > > > > > > > > > As for the question, look at these functions: > > > > > > > > > > From bin to dec (converts a string to a decimal integer using > > > > the radix - > > > > > second attribute) > > > > > #InputBaseN(1010, 2)# > > > > > > > > > > from dec
Re: Query size
Thanks, I am using MS SQL. Srimanta - Original Message - From: "Jeff" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, November 07, 2002 9:13 PM Subject: RE: Query size > What database are you using? Does this have to be a ColdFusion > solution? Or can you work it on the Database end? > > Jeff > > -Original Message- > From: Srimanta [mailto:mail@;designshop.co.nz] > Sent: Friday, November 08, 2002 6:34 PM > To: CF-Talk > Subject: Re: Query size > > > Thanks, > The best solution would have been to get the exact query size. > Unfortunately average values will not do the job in this case. Dont > think writing it to a file and then using CF directory to get the file > size will work either as more than one user can run multiple queries > simultaneously. Locking is an option. Will have to experiment and see > how it works. Would be happy to see Macromedia provide a function to get > query size in the future versions of CF. I think I am in trouble as I > promsed my client that it can be easily done... > > Kind Regards, > Srimanta > > - Original Message - > From: "Mosh Teitelbaum" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Thursday, November 07, 2002 3:26 PM > Subject: RE: Query size > > > > Well, it's not in KBs or MBs, but you can use queryName.RecordCount to > > > determine the number of results in the record. Multiply that by some > > multiple and you have an "average" (perhaps?) size. Sort of. 8^) > > > > -- > > Mosh Teitelbaum > > evoch, LLC > > Tel: (301) 625-9191 > > Fax: (301) 933-3651 > > Email: [EMAIL PROTECTED] > > WWW: http://www.evoch.com/ > > > > > > > -Original Message- > > > From: Srimanta [mailto:mail@;designshop.co.nz] > > > Sent: Friday, November 08, 2002 2:56 PM > > > To: CF-Talk > > > Subject: Query size > > > > > > > > > Hi Forum, > > > > > > I need a way to display the query size (in Kb or Mb) in a Cold > > > Fusion application and then use it to bill a client. Unusual > > > requirement. Had a quick look through the list of Cf > > > functions ... didnt seem to find one or did I miss ? > > > Is there a cold fusion function to get the size of query > resultsets? I > > > need to be able to display / output the size and then use it for > billing > > > purposes. > > > I know one can know the query size and time in the debugging > environment, > > > but this is for the client to view. > > > > > > any Help would be much appreciated. > > > > > > Thanks > > > Srimanta > > > - Original Message - > > > From: "Michael Dinowitz" <[EMAIL PROTECTED]> > > > To: "CF-Talk" <[EMAIL PROTECTED]> > > > Sent: Thursday, November 07, 2002 2:22 PM > > > Subject: Re: sorry if repost > > > > > > > > > > Someone said that the HoF server was hitting them with what > > > looked like a > > > > DoS attack. I couldn't find the problem and took the server down > > > > to > look > > > > more. I havn't heard back from the guy to know if the problem > > > was fixed or > > > > not (I think it was a change in his anti-spam routing, but) > > > > > > > > As for the question, look at these functions: > > > > > > > > From bin to dec (converts a string to a decimal integer using > > > the radix - > > > > second attribute) > > > > #InputBaseN(1010, 2)# > > > > > > > > from dec to bin (converts a decimal integer to a string using > > > the radix - > > > > second attribute) > > > > #formatbaseN(10, 2)# > > > > > > > > > > > > > > > > > sorry if this is a repost for some of you, however I didn't get > > > > > my postreally, I hardly ever get my post, I get it like an > > > > > hour later or sobut never on time? mike? > > > > > > > > > > > > > > > does anyone know of an easy method of transforming > > > > > a binary number to a decimal number? > > > > > > > > > > > > > > > > > > > > something that would look like that :) > > > > > > > > > > ..tony > > > > > > > > > > Tony Weeg > > > > > Senior Web Developer > > > > > Information System Design > > > > > Navtrak, Inc. > > > > > Fleet Management Solutions > > > > > www.navtrak.net > > > > > 410.548.2337 > > > > > > > > > > > > > > > > > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
RE: Query size
What database are you using? Does this have to be a ColdFusion solution? Or can you work it on the Database end? Jeff -Original Message- From: Srimanta [mailto:mail@;designshop.co.nz] Sent: Friday, November 08, 2002 6:34 PM To: CF-Talk Subject: Re: Query size Thanks, The best solution would have been to get the exact query size. Unfortunately average values will not do the job in this case. Dont think writing it to a file and then using CF directory to get the file size will work either as more than one user can run multiple queries simultaneously. Locking is an option. Will have to experiment and see how it works. Would be happy to see Macromedia provide a function to get query size in the future versions of CF. I think I am in trouble as I promsed my client that it can be easily done... Kind Regards, Srimanta - Original Message - From: "Mosh Teitelbaum" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, November 07, 2002 3:26 PM Subject: RE: Query size > Well, it's not in KBs or MBs, but you can use queryName.RecordCount to > determine the number of results in the record. Multiply that by some > multiple and you have an "average" (perhaps?) size. Sort of. 8^) > > -- > Mosh Teitelbaum > evoch, LLC > Tel: (301) 625-9191 > Fax: (301) 933-3651 > Email: [EMAIL PROTECTED] > WWW: http://www.evoch.com/ > > > > -Original Message- > > From: Srimanta [mailto:mail@;designshop.co.nz] > > Sent: Friday, November 08, 2002 2:56 PM > > To: CF-Talk > > Subject: Query size > > > > > > Hi Forum, > > > > I need a way to display the query size (in Kb or Mb) in a Cold > > Fusion application and then use it to bill a client. Unusual > > requirement. Had a quick look through the list of Cf > > functions ... didnt seem to find one or did I miss ? > > Is there a cold fusion function to get the size of query resultsets? I > > need to be able to display / output the size and then use it for billing > > purposes. > > I know one can know the query size and time in the debugging environment, > > but this is for the client to view. > > > > any Help would be much appreciated. > > > > Thanks > > Srimanta > > - Original Message - > > From: "Michael Dinowitz" <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Thursday, November 07, 2002 2:22 PM > > Subject: Re: sorry if repost > > > > > > > Someone said that the HoF server was hitting them with what > > looked like a > > > DoS attack. I couldn't find the problem and took the server down > > > to look > > > more. I havn't heard back from the guy to know if the problem > > was fixed or > > > not (I think it was a change in his anti-spam routing, but) > > > > > > As for the question, look at these functions: > > > > > > From bin to dec (converts a string to a decimal integer using > > the radix - > > > second attribute) > > > #InputBaseN(1010, 2)# > > > > > > from dec to bin (converts a decimal integer to a string using > > the radix - > > > second attribute) > > > #formatbaseN(10, 2)# > > > > > > > > > > > > > sorry if this is a repost for some of you, however I didn't get > > > > my postreally, I hardly ever get my post, I get it like an > > > > hour later or sobut never on time? mike? > > > > > > > > > > > > does anyone know of an easy method of transforming > > > > a binary number to a decimal number? > > > > > > > > > > > > > > > > something that would look like that :) > > > > > > > > ..tony > > > > > > > > Tony Weeg > > > > Senior Web Developer > > > > Information System Design > > > > Navtrak, Inc. > > > > Fleet Management Solutions > > > > www.navtrak.net > > > > 410.548.2337 > > > > > > > > > > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: Query size
> > Well, it's not in KBs or MBs, but you can use > queryName.RecordCount to > > determine the number of results in the record. Multiply > > that by some > > multiple and you have an "average" (perhaps?) size. Sort > > of. 8^) I would think that simplest way would be to squirt the data out to a file with CFILE and then check the size of the file. It ain't fast, but it'll do it. Jim Davis ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
Re: Query size
Thanks, The best solution would have been to get the exact query size. Unfortunately average values will not do the job in this case. Dont think writing it to a file and then using CF directory to get the file size will work either as more than one user can run multiple queries simultaneously. Locking is an option. Will have to experiment and see how it works. Would be happy to see Macromedia provide a function to get query size in the future versions of CF. I think I am in trouble as I promsed my client that it can be easily done... Kind Regards, Srimanta - Original Message - From: "Mosh Teitelbaum" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, November 07, 2002 3:26 PM Subject: RE: Query size > Well, it's not in KBs or MBs, but you can use queryName.RecordCount to > determine the number of results in the record. Multiply that by some > multiple and you have an "average" (perhaps?) size. Sort of. 8^) > > -- > Mosh Teitelbaum > evoch, LLC > Tel: (301) 625-9191 > Fax: (301) 933-3651 > Email: [EMAIL PROTECTED] > WWW: http://www.evoch.com/ > > > > -Original Message- > > From: Srimanta [mailto:mail@;designshop.co.nz] > > Sent: Friday, November 08, 2002 2:56 PM > > To: CF-Talk > > Subject: Query size > > > > > > Hi Forum, > > > > I need a way to display the query size (in Kb or Mb) in a Cold Fusion > > application and then use it to > > bill a client. Unusual requirement. Had a quick look through the > > list of Cf > > functions ... didnt seem to find one or did I miss ? > > Is there a cold fusion function to get the size of query resultsets? I > > need to be able to display / output the size and then use it for billing > > purposes. > > I know one can know the query size and time in the debugging environment, > > but this is for the client to view. > > > > any Help would be much appreciated. > > > > Thanks > > Srimanta > > - Original Message - > > From: "Michael Dinowitz" <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Thursday, November 07, 2002 2:22 PM > > Subject: Re: sorry if repost > > > > > > > Someone said that the HoF server was hitting them with what > > looked like a > > > DoS attack. I couldn't find the problem and took the server down to look > > > more. I havn't heard back from the guy to know if the problem > > was fixed or > > > not (I think it was a change in his anti-spam routing, but) > > > > > > As for the question, look at these functions: > > > > > > From bin to dec (converts a string to a decimal integer using > > the radix - > > > second attribute) > > > #InputBaseN(1010, 2)# > > > > > > from dec to bin (converts a decimal integer to a string using > > the radix - > > > second attribute) > > > #formatbaseN(10, 2)# > > > > > > > > > > > > > sorry if this is a repost for some of you, however I didn't > > > > get my postreally, I hardly ever get my post, I get it like > > > > an hour later or sobut never on time? mike? > > > > > > > > > > > > does anyone know of an easy method of transforming > > > > a binary number to a decimal number? > > > > > > > > > > > > > > > > something that would look like that :) > > > > > > > > ..tony > > > > > > > > Tony Weeg > > > > Senior Web Developer > > > > Information System Design > > > > Navtrak, Inc. > > > > Fleet Management Solutions > > > > www.navtrak.net > > > > 410.548.2337 > > > > > > > > > > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting.
RE: Query size
> Well, it's not in KBs or MBs, but you can use > queryName.RecordCount to > determine the number of results in the record. Multiply > that by some > multiple and you have an "average" (perhaps?) size. Sort > of. 8^) Or ... #len("#valuelist(myquery.textcolumn)##valuelist(myquery.anothertextco lumn)#")# ... You can't use LEN() on text or ntext columns in MS SQL Server, which is why it would have to be done in CF ... this could take a while tho... :-/ ... if the data's only entered into varchar fields where the max length is I think 8000 characters, then you could get it from the db with something like: SELECT SUM(LEN(varcharcolumn)) FROM mytable ... each character is a byte, so every 1024 characters is 1kb... Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
RE: Query size
Well, it's not in KBs or MBs, but you can use queryName.RecordCount to determine the number of results in the record. Multiply that by some multiple and you have an "average" (perhaps?) size. Sort of. 8^) -- Mosh Teitelbaum evoch, LLC Tel: (301) 625-9191 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ > -Original Message- > From: Srimanta [mailto:mail@;designshop.co.nz] > Sent: Friday, November 08, 2002 2:56 PM > To: CF-Talk > Subject: Query size > > > Hi Forum, > > I need a way to display the query size (in Kb or Mb) in a Cold Fusion > application and then use it to > bill a client. Unusual requirement. Had a quick look through the > list of Cf > functions ... didnt seem to find one or did I miss ? > Is there a cold fusion function to get the size of query resultsets? I > need to be able to display / output the size and then use it for billing > purposes. > I know one can know the query size and time in the debugging environment, > but this is for the client to view. > > any Help would be much appreciated. > > Thanks > Srimanta > - Original Message - > From: "Michael Dinowitz" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Thursday, November 07, 2002 2:22 PM > Subject: Re: sorry if repost > > > > Someone said that the HoF server was hitting them with what > looked like a > > DoS attack. I couldn't find the problem and took the server down to look > > more. I havn't heard back from the guy to know if the problem > was fixed or > > not (I think it was a change in his anti-spam routing, but) > > > > As for the question, look at these functions: > > > > From bin to dec (converts a string to a decimal integer using > the radix - > > second attribute) > > #InputBaseN(1010, 2)# > > > > from dec to bin (converts a decimal integer to a string using > the radix - > > second attribute) > > #formatbaseN(10, 2)# > > > > > > > > > sorry if this is a repost for some of you, however I didn't > > > get my postreally, I hardly ever get my post, I get it like > > > an hour later or sobut never on time? mike? > > > > > > > > > does anyone know of an easy method of transforming > > > a binary number to a decimal number? > > > > > > > > > > > > something that would look like that :) > > > > > > ..tony > > > > > > Tony Weeg > > > Senior Web Developer > > > Information System Design > > > Navtrak, Inc. > > > Fleet Management Solutions > > > www.navtrak.net > > > 410.548.2337 > > > > > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
Re: Query size
> - Original Message - > From: "Srimanta" <[EMAIL PROTECTED]> >> I need a way to display the query size (in Kb or Mb) in a >> Cold Fusion >> application and then use it to >> bill a client. Unusual requirement. Had a quick look >> through the list of > Cf >> functions ... didnt seem to find one or did I miss ? > -- > Quick thought: write the query results out to a file and > use CFDIRECTORY to > grab the filesize? Don't forget to delete the file afterward. ;P Isaac Certified Advanced ColdFusion 5 Developer www.turnkey.to 954-776-0046 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
Re: QUERY SIZE.
Not sure what you mean by query size? Is it the amount of rows? If so use #queryname.recordcount#. HTH, Frank - Original Message - From: "Srimanta" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, November 08, 2002 1:10 PM Subject: QUERY SIZE. > Hi Forum, > > I need a way to display the query size (in Kb or Mb) in a Cold Fusion > application and then use it to > bill a client. Unusual requirement. Had a quick look through the list of Cf > functions ... didnt seem to find one or did I miss ? > Is there a cold fusion function to get the size of query resultsets? I > need to be able to display / output the size and then use it for billing > purposes. > I know one can know the query size and time in the debugging environment, > but this is for the client to view. > > Help would be much appreciated. > > Thanks > > Srimanta > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
Re: Query size
- Original Message - From: "Srimanta" <[EMAIL PROTECTED]> > I need a way to display the query size (in Kb or Mb) in a Cold Fusion > application and then use it to > bill a client. Unusual requirement. Had a quick look through the list of Cf > functions ... didnt seem to find one or did I miss ? -- Quick thought: write the query results out to a file and use CFDIRECTORY to grab the filesize? Gyrus [EMAIL PROTECTED] work: http://www.tengai.co.uk play: http://www.norlonto.net PGP key available ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm
Re: Query size
You might want to try adding a calculated column to each row that you return SELECT foo, bar, hum, DATALENGTH(foo + '' + bar + '' + hum) AS bytes The DATALENGTH function works with SQL Server (don't know about Oracle...). HTH, Jeff Garza - Original Message - From: "Srimanta" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Friday, November 08, 2002 12:55 PM Subject: Query size Hi Forum, I need a way to display the query size (in Kb or Mb) in a Cold Fusion application and then use it to bill a client. Unusual requirement. Had a quick look through the list of Cf functions ... didnt seem to find one or did I miss ? Is there a cold fusion function to get the size of query resultsets? I need to be able to display / output the size and then use it for billing purposes. I know one can know the query size and time in the debugging environment, but this is for the client to view. any Help would be much appreciated. Thanks Srimanta - Original Message - From: "Michael Dinowitz" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, November 07, 2002 2:22 PM Subject: Re: sorry if repost > Someone said that the HoF server was hitting them with what looked like a > DoS attack. I couldn't find the problem and took the server down to look > more. I havn't heard back from the guy to know if the problem was fixed or > not (I think it was a change in his anti-spam routing, but) > > As for the question, look at these functions: > > From bin to dec (converts a string to a decimal integer using the radix - > second attribute) > #InputBaseN(1010, 2)# > > from dec to bin (converts a decimal integer to a string using the radix - > second attribute) > #formatbaseN(10, 2)# > > > > > sorry if this is a repost for some of you, however I didn't > > get my postreally, I hardly ever get my post, I get it like > > an hour later or sobut never on time? mike? > > > > > > does anyone know of an easy method of transforming > > a binary number to a decimal number? > > > > > > > > something that would look like that :) > > > > ..tony > > > > Tony Weeg > > Senior Web Developer > > Information System Design > > Navtrak, Inc. > > Fleet Management Solutions > > www.navtrak.net > > 410.548.2337 > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm