Search Results

Search found 17924 results on 717 pages for 'z order'.

Page 155/717 | < Previous Page | 151 152 153 154 155 156 157 158 159 160 161 162  | Next Page >

  • Query optimization using composite indexes

    - by xmarch
    Many times, during the process of creating a new Coherence application, developers do not pay attention to the way cache queries are constructed; they only check that these queries comply with functional specs. Later, performance testing shows that these perform poorly and it is then when developers start working on improvements until the non-functional performance requirements are met. This post describes the optimization process of a real-life scenario, where using a composite attribute index has brought a radical improvement in query execution times.  The execution times went down from 4 seconds to 2 milliseconds! E-commerce solution based on Oracle ATG – Endeca In the context of a new e-commerce solution based on Oracle ATG – Endeca, Oracle Coherence has been used to calculate and store SKU prices. In this architecture, a Coherence cache stores the final SKU prices used for Endeca baseline indexing. Each SKU price is calculated from a base SKU price and a series of calculations based on information from corporate global discounts. Corporate global discounts information is stored in an auxiliary Coherence cache with over 800.000 entries. In particular, to obtain each price the process needs to execute six queries over the global discount cache. After the implementation was finished, we discovered that the most expensive steps in the price calculation discount process were the global discounts cache query. This query has 10 parameters and is executed 6 times for each SKU price calculation. The steps taken to optimise this query are described below; Starting point Initial query was: String filter = "levelId = :iLevelId AND  salesCompanyId = :iSalesCompanyId AND salesChannelId = :iSalesChannelId "+ "AND departmentId = :iDepartmentId AND familyId = :iFamilyId AND brand = :iBrand AND manufacturer = :iManufacturer "+ "AND areaId = :iAreaId AND endDate >=  :iEndDate AND startDate <= :iStartDate"; Map<String, Object> params = new HashMap<String, Object>(10); // Fill all parameters. params.put("iLevelId", xxxx); // Executing filter. Filter globalDiscountsFilter = QueryHelper.createFilter(filter, params); NamedCache globalDiscountsCache = CacheFactory.getCache(CacheConstants.GLOBAL_DISCOUNTS_CACHE_NAME); Set applicableDiscounts = globalDiscountsCache.entrySet(globalDiscountsFilter); With the small dataset used for development the cache queries performed very well. However, when carrying out performance testing with a real-world sample size of 800,000 entries, each query execution was taking more than 4 seconds. First round of optimizations The first optimisation step was the creation of separate Coherence index for each of the 10 attributes used by the filter. This avoided object deserialization while executing the query. Each index was created as follows: globalDiscountsCache.addIndex(new ReflectionExtractor("getXXX" ) , false, null); After adding these indexes the query execution time was reduced to between 450 ms and 1s. However, these execution times were still not good enough.  Second round of optimizations In this optimisation phase a Coherence query explain plan was used to identify how many entires each index reduced the results set by, along with the cost in ms of executing that part of the query. Though the explain plan showed that all the indexes for the query were being used, it also showed that the ordering of the query parameters was "sub-optimal".  Parameters associated to object attributes with high-cardinality should appear at the beginning of the filter, or more specifically, the attributes that filters out the highest of number records should be placed at the beginning. But examining corporate global discount data we realized that depending on the values of the parameters used in the query the “good” order for the attributes was different. In particular, if the attributes brand and family had specific values it was more optimal to have a different query changing the order of the attributes. Ultimately, we ended up with three different optimal variants of the query that were used in its relevant cases: String filter = "brand = :iBrand AND familyId = :iFamilyId AND departmentId = :iDepartmentId AND levelId = :iLevelId "+ "AND manufacturer = :iManufacturer AND endDate >= :iEndDate AND salesCompanyId = :iSalesCompanyId "+ "AND areaId = :iAreaId AND salesChannelId = :iSalesChannelId AND startDate <= :iStartDate"; String filter = "familyId = :iFamilyId AND departmentId = :iDepartmentId AND levelId = :iLevelId AND brand = :iBrand "+ "AND manufacturer = :iManufacturer AND endDate >=  :iEndDate AND salesCompanyId = :iSalesCompanyId "+ "AND areaId = :iAreaId  AND salesChannelId = :iSalesChannelId AND startDate <= :iStartDate"; String filter = "brand = :iBrand AND departmentId = :iDepartmentId AND familyId = :iFamilyId AND levelId = :iLevelId "+ "AND manufacturer = :iManufacturer AND endDate >= :iEndDate AND salesCompanyId = :iSalesCompanyId "+ "AND areaId = :iAreaId AND salesChannelId = :iSalesChannelId AND startDate <= :iStartDate"; Using the appropriate query depending on the value of brand and family parameters the query execution time dropped to between 100 ms and 150 ms. But these these execution times were still not good enough and the solution was cumbersome. Third and last round of optimizations The third and final optimization was to introduce a composite index. However, this did mean that it was not possible to use the Coherence Query Language (CohQL), as composite indexes are not currently supporte in CohQL. As the original query had 8 parameters using EqualsFilter, 1 using GreaterEqualsFilter and 1 using LessEqualsFilter, the composite index was built for the 8 attributes using EqualsFilter. The final query had an EqualsFilter for the multiple extractor, a GreaterEqualsFilter and a LessEqualsFilter for the 2 remaining attributes.  All individual indexes were dropped except the ones being used for LessEqualsFilter and GreaterEqualsFilter. We were now running in an scenario with an 8-attributes composite filter and 2 single attribute filters. The composite index created was as follows: ValueExtractor[] ve = { new ReflectionExtractor("getSalesChannelId" ), new ReflectionExtractor("getLevelId" ),    new ReflectionExtractor("getAreaId" ), new ReflectionExtractor("getDepartmentId" ),    new ReflectionExtractor("getFamilyId" ), new ReflectionExtractor("getManufacturer" ),    new ReflectionExtractor("getBrand" ), new ReflectionExtractor("getSalesCompanyId" )}; MultiExtractor me = new MultiExtractor(ve); NamedCache globalDiscountsCache = CacheFactory.getCache(CacheConstants.GLOBAL_DISCOUNTS_CACHE_NAME); globalDiscountsCache.addIndex(me, false, null); And the final query was: ValueExtractor[] ve = { new ReflectionExtractor("getSalesChannelId" ), new ReflectionExtractor("getLevelId" ),    new ReflectionExtractor("getAreaId" ), new ReflectionExtractor("getDepartmentId" ),    new ReflectionExtractor("getFamilyId" ), new ReflectionExtractor("getManufacturer" ),    new ReflectionExtractor("getBrand" ), new ReflectionExtractor("getSalesCompanyId" )}; MultiExtractor me = new MultiExtractor(ve); // Fill composite parameters.String SalesCompanyId = xxxx;...AndFilter composite = new AndFilter(new EqualsFilter(me,                   Arrays.asList(iSalesChannelId, iLevelId, iAreaId, iDepartmentId, iFamilyId, iManufacturer, iBrand, SalesCompanyId)),                                     new GreaterEqualsFilter(new ReflectionExtractor("getEndDate" ), iEndDate)); AndFilter finalFilter = new AndFilter(composite, new LessEqualsFilter(new ReflectionExtractor("getStartDate" ), iStartDate)); NamedCache globalDiscountsCache = CacheFactory.getCache(CacheConstants.GLOBAL_DISCOUNTS_CACHE_NAME); Set applicableDiscounts = globalDiscountsCache.entrySet(finalFilter);      Using this composite index the query improved dramatically and the execution time dropped to between 2 ms and  4 ms.  These execution times completely met the non-functional performance requirements . It should be noticed than when using the composite index the order of the attributes inside the ValueExtractor was not relevant.

    Read the article

  • Large files in SharePoint 2010

    - by Sahil Malik
    SharePoint 2010 Training: more information Hoooorayy! My latest code-mag article is finally online. This is an article I’ve been wanting to write for a while now – there is just so much goo in the world around large file management in SharePoint. So I thought an article that sums up the things you need to consider for large file management projects in SharePoint was in order. Anyway, here is the article, enjoy Read full article ....

    Read the article

  • How to make sprint planning fun

    - by Jacob Spire
    Not only are our sprint planning meetings not fun, they're downright dreadful. The meetings are tedious, and boring, and take forever (a day, but it feels like a lot longer). The developers complain about it, and dread upcoming plannings. Our routine is pretty standard (user story inserted into sprint backlog by priority story is taken apart to tasks tasks are estimated in hours repeat), and I can't figure out what we're doing wrong. How can we make the meetings more enjoyable? ... Some more details, in response to requests for more information: Why are the backlog items not inserted and prioritized before sprint kickoff? User stories are indeed prioritized; we have no idea how long they'll take until we break them down into tasks! From the (excellent) answers here, I see that maybe we shouldn't estimate tasks at all, only the user stories. The reason we estimate tasks (and not stories) is because we've been getting story-estimates terribly wrong -- but I guess that's the subject for an altogether different question. Why are developers complaining? Meetings are long. Meetings are monotonous. Story after story, task after task, struggling (yes, struggling) to estimate how long it will take and what it involves. Estimating tasks makes user-story-estimation seem pointless. The longer the meeting, the less focus in the room. The less focused colleagues are, the longer the meeting takes. A recursive hate-spiral develops. We've considered splitting the meeting into two days in order to keep people focused, but the developers wouldn't hear of it. One day of planning is bad enough; now we'll have two?! Part of our problem is that we go into very small detail (in order to get more accurate estimations). But when we estimate roughly, we go way off the mark! To sum up the question: What are we doing wrong? What additional ways are there to make the meeting generally more enjoyable?

    Read the article

  • Weird Results A/B Test in Google Website Optimizer

    - by Yisroel
    I set up a test in Google Website Optimizer that has a 3 variations - original (A), B, and C. In order to further validate the results of the test, I added a variation C that is exactly the same as the original. And thats where the results get weird. 6 days into the test, the best performing variation is C. It outperforms the original by 18.4%! How is that possible? Do I now discount the results of this test entirely?

    Read the article

  • Features of Professional SEO Services

    The importance of Search Engine Optimization has given way to professional SEO services. The way they conduct optimization techniques to improve the websites' rankings are exemplary. Most of the companies that are involved into SEO services relate themselves as an effective alternative to improve the rankings in a professional manner. The current situation is that every reputed company are seeking SEO services in order to enhance their rankings on a further note.

    Read the article

  • SEO Strategies and Common SEO Questions

    In order to grow in the online web market & utilize effective SEO strategies, you as a website owner need to have answer to these common SEO questions. You would be able to decide which search engine optimization and link building tactics would work for your website when you are aware of all the strategies that are involved in SEO.

    Read the article

  • Are you ready to grow that Mo (moustache)? Movember is coming

    - by Chris Hammond
    Well here we are, nearing the end of the month of October and coming up on the month of N Movember once again. We here at DNNCorp are in our third year of supporting the Movember cause, growing facial hair on our upper lips to raise awareness and money for men’s health issues. Anyone can participate in Movember, and if you sign up, join a team, you can order some free materials from the Movember organization that you can use to help try and raise funds. The rules for Movember are simple. Start clean...(read more)

    Read the article

  • Technology Insights

    - by GavinPayneUK
    In my day job I speak to both technical and business people about the subjects which matter to them the most, in depths of detail which please them the most.  This allows me to ensure the technical people work in a way that meets the client’s business goals.   Sadly, I sometimes meet technical people who due to time constraints or lack of opportunity rarely get to do anything but focus on the bits, bytes, parameters and switches which they need to manage in order to make the “machine do...(read more)

    Read the article

  • In 13.04 using Unity Tweak Tool hot corners stops working after reboot

    - by Sanseriff Sanseriff
    I have 13.04 64 bit Ubuntu installed and I'm using Unity Tweak tool to enable hot corners everything works as it should as long as I don't reboot as soon as I do hotcorners stops working. In order to get them functioning again I have to open the tweak tool and turn hotcorners off and then back on after every reboot. This I admit isn't a huge issue but is annoying is there anyway to get hotcorners to work properly after reboot with out having to reset them every time?

    Read the article

  • Next lowest value in MySQL Database [migrated]

    - by Justin Edwards
    SELECT * FROM `experience` WHERE `reqexp` <> '4793' ORDER BY 'lvl' DESC LIMIT 1 Here is what I want to do. I am making an online game for a client, and need to be able to use a mysql query with a random value, and find the level associated with that amount of experience. In this case, I need to find the next value lower than 4793 that already exists in the database so I can determine the players appropriate level. Any Ideas?

    Read the article

  • Custom Folders in SSMS Object Explorer? Yes, we can!

    - by Luca Zavarella
    When you have a huge objects’ number in SSMS Object Explorer, you often get lost in finding items. So it’d be useful to catalog those objects in folders, in order to follow an application’s logical layer subdivision, for example. There is a fantastic add-in for SSMS that helps us to do that: http://www.sqltreeo.com The developer of this add-in has written a related post in his blog: http://www.sqltreeo.com/wp/dowload-free-ssms-add-in-to-create-own-folder-for-database-objects/ So another useful tool to add to our  SQL Server toolbox

    Read the article

  • What is the actual problem with a prototype based design?

    - by WindScar
    I feel like anything that can be developed using OO/functional languages can be generally made 'better' using a prototype based language, because they appaer to have the best of them all: high order functions, flexibility to simulate any OO structure, productivity (low verbosity) and scalability because of concurrency. But it seems like they are avoided for the creation of executable applications and of bigger projects in general. Why that?

    Read the article

  • Search Engine Optimization and SEO Services - What Do They Offer?

    Search engine optimization involves using the Internet as a marketing tool. Companies that are using the Internet to attract customers desire to optimize their exposure to potential to customers. In order to best advantage of SEO, it is recommended that you hire a professional service that can implement programs to evaluate the optimum marketing potential of the Internet. When considering hiring a company to assist you in this process it is important to understand how such services work.

    Read the article

  • Migrate to Natively Compiled SQL Server Stored Procedures for Hekaton

    In order to take full advantage of the In-Memory OLTP options in SQL Server 2014, you should migrate standard stored procedures that references Memory-Optimized tables to natively compiled ones. In this tip we will see how to achieve this goal. New! SQL Prompt 6 – now with tab historyWriting, exploring, and editing SQL just became even more effortless with SQL Prompt 6. Download a free trial.

    Read the article

  • CUPS Authentication for Admin on localhost:631 interface

    - by Tony Kruse
    I have searched quite a bit, saw the one response that purported to have a solution to this but it did not work in my case. My Brother printer is not shown in CUPS so I go to Admin-Add Printer it gives me the User Name/Password popup with refuses to recognize my user name on the machine. This is a brand new install of 13.1. My Restrict Access to the admin pages section has: Order allow, deny Allow localhost

    Read the article

  • Knowing the Search Engine Process to Improve SEO

    In order to begin your Search Engine Optimization you must first know how search engines work, whether or not you hire an SEO Consultant. It's important to know what you are trying to attract, as well as how search engines find their pages and determine their rating. There are several steps that are part of a search engines process until they get the results pop up on a searchers screen.

    Read the article

  • High ROI Through Search Engine Optimization

    In online marketing, it is important to provide marketer with efficient or high Return of Investment (ROI) in order for them to build trust to the web site, where they are posting their products. But how can this be possible? ROI is a percentage figure which tells you how much your investment would be to have your products created, advertised, sold, and delivered.

    Read the article

  • Research topics for starting and optimizing a high-traffic website

    - by user745434
    I bury a good deal of my ideas for fear that I don't know enough about scaling web applications and high-traffic websites. That said, I'd like to know of any general topics to research in order to ensure that your web app doesn't break / slow down when you start getting to Twitter-level traffic. I'm looking for research topics with, preferably, additional resources. For example: Make sure you optimize SQL queries (see High Performance MySQL Optimization)

    Read the article

< Previous Page | 151 152 153 154 155 156 157 158 159 160 161 162  | Next Page >