Hi Jimmy
If I understand correctly the only table that will support a bitmap is the Order Table on Server A. All the other tables have compound keys and will not support bitmaps.
It is possible to keep the Parent Child relationship and split the children out into their own globals. You just change the Global node in the Mapping to something else. That will make your Journal filter code a little more complex but it could improve performance a good bit.
The fact that you have OrderDetails and OrderDetails2 makes me think there is a lot of details for every order. If are storing a lot of data for each row and each order has a large number of children your global is going to be large and that will slow down query performance. Just switching the children to different globals could help.
Building Indices talks about about the fastest ways for you to rebuild an index on different types of systems. You might find this helpful for your shadow filter code.
I still recommend using default IDKeys and Foreign Keys but without know what the really important queries are and the Properties and TuneTable data it is hard to know how hard I should push you in that directions.
Bitmaps are great for properties that have fewer than 10,000 distinct values. The fewer the values the better the performance. For example Gender is a great property to use with a bitmap while PatientID is a very bad property to bitmap. The other big win with bitmaps is using multiple bitmaps together to solve a query. While we can do this multi index solution with standard indices as well the performance with bitmap is MUCH faster. For example if you want to find all the men who live in a given state and have a given eye color your where clause would be: WHERE Gender = ? and State = ? and EyeColor = ? If you have a bitmap on each of these properties the query plan would contain something like: Combine Bitmap GenderIndex INTERSECT StateIndex INTERSECT EyeColorIndex
Now you are thinking to yourself that you could define a standard index on (Gender, State, EyeColor) and get great performance and you would be correct, but what happens when the query changes so it does not include Gender? Now your compound index will not perform as well but the bitmaps will still be used and give great performance StateIndex INTERSECT EyeColorIndex. Compound indices are great to solve a specific query, but defining multiple bitmap instead gives you much more flexibility to solve more queries.
Hope this helps. If you want to get into more specific questions about a query I can help with that.
Brendan
- Log in to post comments