couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Panop S. <...@vizrt.com>
Subject Deleting Document
Date Tue, 01 Feb 2011 08:53:49 GMT
Hi,

 

     I have design a document in couchdb like a tree file structure as

 

      1

      |--2

      |    |--4

      |

      |--3

 

      Doc id : 2

      Parent: 1

 

      Doc id : 3

      Parent: 1

 

      Doc id : 4

      Parent: 1

 

      So when I query I emit it by parent Id .

      Then when get  /id/1 , I will get docid =  2 ,3

 

     So if I would like to delete 1 require 2 steps in C# application by
using recursive call.

 

1.       querying /id/1  and issue get command id = 2  and issue delete
command id = 2

2.       querying /id/2  and issue get command id = 4  and issue delete
command id = 4

 

    The problem is if there are a lot of documents it is slow down
performance by recursive in C# code

and query by loading huge documents  and the others client request cannot
process.

 

    As I can think of now for a lot of document by using  &limit=some number
to reduce a lot of tons

Of document to be load.     

 

       And also Can I write some operation to delete indexed id on
javascript of couchdb ? if so, is this good idea ?

          Any Idea ?

 

Big Thanks,

 

 

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message