Re: CFINDEX - how to add/update a single record in an existing collection?
Boy, it's just my day for search-related questions. I'm seeing something weird here and want to know if this is normal. I'm creating an index from a database query. The collection contains about 14k records, and the initial collection size (immediately upon creation) is about 79MB. Optimizing that collection after it is created reduces the collection size to about 37MB! Now, given that all the total size of my database is only about 100MB and that there is a ton of other data in there, I'm willing to believe that the post-optimization size is the correct one, and that collections suffer from some amazing bloat when they are created. So, first, is my experience consistent with that of others, and second, would a better strategy be to create a collection and then optimize it immediately afterwards? Thanks, Pete ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216248 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFINDEX - how to add/update a single record in an existing collection?
As for optimizing, I would consider doing it daily if you're making several updates and/or refreshes throughout the day. If you're only doing a refresh once a day, then I would optimize once a week or no more than once every other day. I think it would be overkill to optimize every day if you're only refreshing once a day. Dave -Original Message- From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 24, 2005 12:54 PM To: CF-Talk Subject: Re: CFINDEX - how to add/update a single record in an existing collection? I ended up taking Dave's query for a single record approach because it simplified a number of things. Because of the nature of the app, I update some of the data one column at a time, but it still needs to be indexed immediately. I have a CFC with an updateCollection method that I just pass a collection name and record ID. Followup question. What contributes to the degradation of verity collections? Will updating single records in a collection kill verity search performance? What strategy should I take with repairing/optimizing collections...scheduled task to do it hourly, or would just once a day suffice? Thanks for the help, Pete ** The information contained in this message, including attachments, may contain privileged or confidential information that is intended to be delivered only to the person identified above. If you are not the intended recipient, or the person responsible for delivering this message to the intended recipient, ALLTEL requests that you immediately notify the sender and asks that you do not read the message or its attachments, and that you delete them without copying or sending them to anyone else. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216231 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFINDEX - how to add/update a single record in an existing collection?
I ended up taking Dave's query for a single record approach because it simplified a number of things. Because of the nature of the app, I update some of the data one column at a time, but it still needs to be indexed immediately. I have a CFC with an updateCollection method that I just pass a collection name and record ID. Followup question. What contributes to the degradation of verity collections? Will updating single records in a collection kill verity search performance? What strategy should I take with repairing/optimizing collections...scheduled task to do it hourly, or would just once a day suffice? Thanks for the help, Pete ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216198 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFINDEX - how to add/update a single record in an existing collection?
Yes, I agree. I only used this as an example since he said he already had his query info for one record. At least that was my understanding of his dilemma. The main point, Pete, that Ray & I are both trying to make is that your CFINDEX can be exactly the same whether your query has returned 1 record or 1,000. You don't need to add all the pound signs, etc., just simply identify the proper fields in the right places and that's it. The number of records returned in the query is irrelevant. If we haven't answered your question, please let us know! Dave -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Friday, August 19, 2005 3:58 PM To: CF-Talk Subject: Re: CFINDEX - how to add/update a single record in an existing collection? Dave, I'm pretty sure, in MX7 at least, you don't need to make a one record query. You can just pass the values. Of course, if you already have the one record query, that would work. ** The information contained in this message, including attachments, may contain privileged or confidential information that is intended to be delivered only to the person identified above. If you are not the intended recipient, or the person responsible for delivering this message to the intended recipient, ALLTEL requests that you immediately notify the sender and asks that you do not read the message or its attachments, and that you delete them without copying or sending them to anyone else. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215887 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFINDEX - how to add/update a single record in an existing collection?
Well, since I know that I have had my LiveDocs edited or removed before, I don't put a lot of creedence in them, and I certainly wasn't impressed when I was notified of what was going on. And, no, my entries weren't inflammatory or derogatory. Pete ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215841 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFINDEX - how to add/update a single record in an existing collection?
Dave, I'm pretty sure, in MX7 at least, you don't need to make a one record query. You can just pass the values. Of course, if you already have the one record query, that would work. On 8/19/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Pete, > > Actually, you would just execute a CFQUERY that would return that one record, > and as long as your KEY is the same, issue your cfindex just like you would > if you were indexing a query with 1,000 records. > > > select [your fields] > from [your table] > where [your criteria to return just the new record] > > key="id" title="name" query="getNewDataCardForIndexing" body="name, > cardcontent, metadata"> > > That's all you need to do. Now, you could also build the query dynamically > if you don't want to re-query your databse, using the query functions. > > HTH, > > Dave > > > > -----Original Message----- > From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED] > Sent: Friday, August 19, 2005 2:31 PM > To: CF-Talk > Subject: CFINDEX - how to add/update a single record in an existing > collection? > > > Sometimes, no, make that usually, Macromedia's documentation for CF > just barely scratches the surface. > > I have an existing collection that is populated from a query. The > data returned from this query gets updated quite often. In order to > allow accurate searches, I would like to add (for new records) or > update a record in a collection from query data...actually, I'll be > passing the data in via a CFC... > > Is there a way to do this? Here is the original tag call to populate > the collection: > > key="id" title="name" query="getDatacardsForIndexing" body="name, > cardcontent, metadata"> > > So, in order to do this, would I do something like: > > key="#arguments.id#" title="#arguments.name#" body="#arguments.name#, > #arguments.cardcontent#, #arguments.metadata#"> > > (note that I omitted the query attribute). Would this update just a > single record in the coll_datacards collection? > > Thanks, > > Pete > > PS Is it time to create an "Undocumented CF" web site? If there's > enough interest and enough content, I'm willing to start this as a > project...I just know that between things like cfcollection (and > related tags), cfdocument, cfchart, and more that there's a lot of > stuff that Macromedia doesn't cover in their docs. > ** > The information contained in this message, including attachments, may contain > privileged or confidential information that is intended to be delivered only > to the > person identified above. If you are not the intended recipient, or the person > responsible for delivering this message to the intended recipient, ALLTEL > requests > that you immediately notify the sender and asks that you do not read the > message or its > attachments, and that you delete them without copying or sending them to > anyone else. > > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215836 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFINDEX - how to add/update a single record in an existing collection?
> PS Is it time to create an "Undocumented CF" web site? If > there's > enough interest and enough content, I'm willing to start > this as a > project...I just know that between things like > cfcollection (and > related tags), cfdocument, cfchart, and more that there's > a lot of > stuff that Macromedia doesn't cover in their docs. It's probably more apprproiate to add comments about these things to the livedocs on the MM site. Some livedocs comments are adopted into the documentation, others are not (serviceFactory info for instance). http://livedocs.macromedia.com s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215834 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: CFINDEX - how to add/update a single record in an existing collection?
Yes, it would work. (or should work - yell at me if it doesnt) On 8/19/05, Pete Ruckelshaus <[EMAIL PROTECTED]> wrote: > Sometimes, no, make that usually, Macromedia's documentation for CF > just barely scratches the surface. > > I have an existing collection that is populated from a query. The > data returned from this query gets updated quite often. In order to > allow accurate searches, I would like to add (for new records) or > update a record in a collection from query data...actually, I'll be > passing the data in via a CFC... > > Is there a way to do this? Here is the original tag call to populate > the collection: > > key="id" title="name" query="getDatacardsForIndexing" body="name, > cardcontent, metadata"> > > So, in order to do this, would I do something like: > > key="#arguments.id#" title="#arguments.name#" body="#arguments.name#, > #arguments.cardcontent#, #arguments.metadata#"> > > (note that I omitted the query attribute). Would this update just a > single record in the coll_datacards collection? > > Thanks, > > Pete > > PS Is it time to create an "Undocumented CF" web site? If there's > enough interest and enough content, I'm willing to start this as a > project...I just know that between things like cfcollection (and > related tags), cfdocument, cfchart, and more that there's a lot of > stuff that Macromedia doesn't cover in their docs. > > ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215826 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
RE: CFINDEX - how to add/update a single record in an existing collection?
Pete, Actually, you would just execute a CFQUERY that would return that one record, and as long as your KEY is the same, issue your cfindex just like you would if you were indexing a query with 1,000 records. select [your fields] from [your table] where [your criteria to return just the new record] That's all you need to do. Now, you could also build the query dynamically if you don't want to re-query your databse, using the query functions. HTH, Dave -Original Message- From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED] Sent: Friday, August 19, 2005 2:31 PM To: CF-Talk Subject: CFINDEX - how to add/update a single record in an existing collection? Sometimes, no, make that usually, Macromedia's documentation for CF just barely scratches the surface. I have an existing collection that is populated from a query. The data returned from this query gets updated quite often. In order to allow accurate searches, I would like to add (for new records) or update a record in a collection from query data...actually, I'll be passing the data in via a CFC... Is there a way to do this? Here is the original tag call to populate the collection: So, in order to do this, would I do something like: (note that I omitted the query attribute). Would this update just a single record in the coll_datacards collection? Thanks, Pete PS Is it time to create an "Undocumented CF" web site? If there's enough interest and enough content, I'm willing to start this as a project...I just know that between things like cfcollection (and related tags), cfdocument, cfchart, and more that there's a lot of stuff that Macromedia doesn't cover in their docs. ** The information contained in this message, including attachments, may contain privileged or confidential information that is intended to be delivered only to the person identified above. If you are not the intended recipient, or the person responsible for delivering this message to the intended recipient, ALLTEL requests that you immediately notify the sender and asks that you do not read the message or its attachments, and that you delete them without copying or sending them to anyone else. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215822 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
CFINDEX - how to add/update a single record in an existing collection?
Sometimes, no, make that usually, Macromedia's documentation for CF just barely scratches the surface. I have an existing collection that is populated from a query. The data returned from this query gets updated quite often. In order to allow accurate searches, I would like to add (for new records) or update a record in a collection from query data...actually, I'll be passing the data in via a CFC... Is there a way to do this? Here is the original tag call to populate the collection: So, in order to do this, would I do something like: (note that I omitted the query attribute). Would this update just a single record in the coll_datacards collection? Thanks, Pete PS Is it time to create an "Undocumented CF" web site? If there's enough interest and enough content, I'm willing to start this as a project...I just know that between things like cfcollection (and related tags), cfdocument, cfchart, and more that there's a lot of stuff that Macromedia doesn't cover in their docs. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215815 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54