Most efficient way to get row count with a where clause

Have not found a definitive answer on how to do this.  Is there a better way to get a row count from a large table that needs to satisfy a where clause like so:
SELECT COUNT(*) FROM BigTable WHERE TypeName = 'ABC'
I have seen several posts suggesting something like 
SELECT COUNT(*) FROM BigTable(NOLOCK);
and 
selectOBJECT_NAME(object_id),row_count from sys.dm_db_partition_stats
whereOBJECT_NAME(object_id)='BigTable'but I need the row count that satisfies my where clause (i.e.: WHERE TypeName = 'ABC')

It needs index to improve the performance. 
- create index on typename column
- create a indexed view to do the count in advance
-partition on type name (although it's unlikely) then get count from the system tables...
all those 3 solutions are about indexing.
Regards
John Huang, MVP-SQL, MCM-SQL, http://www.sqlnotes.info

Similar Messages

  • Just got girlfriend a new iPad2. Her iMac is a PowerPC G5 (Tiger version 10.4.11) with 512 mb RAM. What's the simplest, most efficient way to get her iPad2 up and running and synced to her Mac?

    Just got girlfriend a new iPad2. Her iMac is a PowerPC G5 (Tiger version 10.4.11) with 512 mb RAM. What's the simplest, most efficient way to get her iPad2 up and running and synced to her Mac?

    Most of the Apple store sales people and some of the genius bar people are only knowledgable on Apple's more recent offerings. They are not very knowledgable, I found, on older PowerPC based Apple computers, I'm afraid.
    Here's the real scoop.
    Your girlfriend's G5 can only install up to OS X 10.5 Leopard. This is the last compatible OS X version for PowerPC users.
    OS X 10.6 Snow Leopard and OS X10.7 Lion are for newer Intel CPU Apple computers.
    Early iMac G5's can only have up to 2 GBs of RAM.
    Later iMac G5's (2005-2006) could take up to 2.5 GBs of RAM
    2 GBs of RAM will run OS X 10.5 Leopard just fine.
    The very latest iTunes (10.5.2) can be installed and runs on both PowerPC and Intel CPU Macs.
    However, there are certain new iTunes feature that won't work without an Intel Mac.
    One of iOS and iTunes feature is sync'g wirelessly over WiFi.
    This will not work unless you have an iDevice running iOS 5 and Intel Mac running 10.6 Snow Leopard or better.
    Although, I was disappointed I would not be able to do this with my G4 Mac, it's not a biggie problem for me.
    So, your girlfriend's computer should be fine for what she intends to use it for.
    The Apple people either just plain didn't know or we're trying to get you to think about buying a new Mac.
    At least, as of now, not truly necessary.
    If Apple, at some later point, drops support for PowerPC users running 10.5, then would be the time to consider a new or "newer" Intel CPU Mac.
    My planned Mac computer upgrade is seeking out a " newer" last version G5 for my "new" Mac.
    I can't afford, right now, to replace all of my core PowerPC software with Intel versions, so I need to stick with the older PowerPC Macs for the time being. The last of the G5's is what I seek.

  • Most efficient way to get document names?

    I was wondering what is the most efficient way to get the document names in a container? Use the built in 'name' index somehow, or is there an 'efficient' XPath/XQuery?
    We've been using the XPath /* which is fine with small instances, but causes a java heap out of member error on large XML instances i.e. /* gets everything which is not ideal when all we want are document names.
    Thx in advance,
    Ant

    Hi Antony,
    Here is an example for retrieving the document names on c++:
    void doQuery(XmlContainer &container,
    XmlQueryContext &context,
    const std::string &XPath)
    XmlResults results(container.queryWithXPath(0, XPath, &context));
    // Iterate through the result set as is normal
    XmlDocument theDocument;
    while(results.next(theDocument))
    std::cout << "Found document named: "
    << theDocument.getName() << std::endl;
    Regards,
    Bogdan Coman

  • Most efficient way to get a  connection from a defined connection -pool [whole message]

    Having recently load-tested the application we are developing I noticed that
    one of the most expensive (time-wise) calls was my fetch of a db-connection
    from the defined db-pool. At present I fetch my connections using :
    private Connection getConnection() throws SQLException {
    try {
    Context jndiCntx = new InitialContext();
    DataSource ds =
    (DataSource)
    jndiCntx.lookup("java:comp/env/jdbc/txDatasource");
    return ds.getConnection();
    } catch (NamingException ne) {
    myLog.error(this.makeSQLInsertable("getConnection - could not
    find connection"));
    throw new EJBException(ne);
    In other parts of the code, not developed by the same team, I've seen the
    same task accomplished by :
    private Connection getConnection() throws SQLException {
    return DriverManager.getConnection("jdbc:weblogic:jts:FTPool");
    From the performance-measurements I made the latter seems to be much more
    efficient (time-wise). To give you some metrics:
    The first version took a total of 75724ms for a total of 7224 calls which
    gives ~ 11ms/call
    The second version took a total of 8127ms for 11662 calls which gives
    ~0,7ms/call
    I'm no JDBC guru som i'm probably missing something vital here. One
    suspicion I have is that the second call first find the jdbc-pool and after
    that makes the very same (DataSource)
    jndiCntx.lookup("java:comp/env/jdbc/txDatasource") in order to fetch the
    actual connection anyway. If that is true then my comparison is plain wrong
    since one call is part of the second. If not, then the second version sure
    seems a lot faster.
    Apart from the obvious performance-differences in the two above approaches,
    is there any other difference one should be aware of (transaction-context
    for instance) between the two ? Basically I'm working in an EJB-environment
    on weblogic 7.0 and looking for the most efficient way to get hold of a
    db-connection in code. Comments anyone ?
    //Linus Nikander - [email protected]

    Linus Nikander wrote:
    Thank you for both your replies. As per your suggestions I've improved my
    connectionhandling (I ended up implementing the Service Locator pattern as a
    matter of fact).
    One thing still puzzles me though. Which (and why) is the "proper" way to
    fetch the actual dataSource. As I stated before in the code I've seen two
    approaches within the code I've got.
    1. myDs = myServiceLocator.getDataSource("jdbc:weblogic:jts:FTPool");
    2. myDs = myServiceLocator.getDataSource("java:comp/env/jdbc/tgsDB");
    where getDataSource does a dataSource = (DataSource)
    initialContext.lookup(dataSourceName); dataSourceName being the input-string
    obviously.
    tgsDB is defined as
    <reference-descriptor>
    <resource-description>
    <res-ref-name>jdbc/tgsDB</res-ref-name>
    <jndi-name>tgs-dataSource</jndi-name>
    </resource-description>
    </reference-descriptor>
    in weblogic-ejb-jar.xml
    From what I can understand by your answer, you don't recommend using the
    JNDI-lookup way of getting the connection at all ?Correct.
    The service locator that
    I implemented will still perform a JNDI lookup, but only once. Will the fact
    that I'm talking to an RMI-object anyway significantly impact performance
    (when compared to you non-jndi-method) ?In some cases, for earlier 7.0s, maybe yes. For the very latest, it shouldn't
    hurt.
    >
    >
    In my two examples above. If i use version 1. How will the server know
    whether to give me a TX-bound connection and when not to ? In version 1
    FTPool maps to a pool with both TX and non-TX datasources. In version 2.
    tgsDB maps directly to a TX-dataSource.
    I might be asking a lot of strange questions, probably because I'm just
    getting the hang of all the resource-reference issues that EJBs are
    associated with.Bear with me ;)
    //Linus
    "Joseph Weinstein" <[email protected]> wrote in message
    news:[email protected]...
    Hi. As Jon said, the lookups are redundant. Because you showed that otherway,
    I will infer that this code is always being run in serverside code. Good.I will give you
    a third way which is much better than either of the ones you showed. Thefirst method
    you showed has a problem for all but the latest sps, your jdbc objectswill all be
    going through an unnecessary level of indirection because you are gettingan rmi jdbc
    object which talks to the jts driver object.
    The second, faster method you showed also has a serious problem! Oneshould
    never call DriverManager methods in multithreaded JDBC programs becauseall
    DriverManager calls are class-synchronized, including some small internalones like
    DriverManager.println(), which all JDBC drivers and even the constructorfor
    SQLException call, so one slow getConnection() call can inadvertantly haltall other
    JDBC being done in the whole JVM! Also, for JVMs that have lots of jdbcdrivers
    registered, DriverManager is inefficient because it simply sends your URLand
    properties to every driver it has registered until it finds one thatdoesn't throw an
    exception and returns a connection.
    Here's the fastest way:
    // do once and reuse driver object everywhere. Can be used by multiplethreads
    Driver d =(Driver)Class.forName("weblogic.jdbc.jts.Driver").newInstance();
    Then, whenever you want a connection:
    public myJDBCMethod()
    Connection c = null; // always a method level object
    try {
    c = d.connect("jdbc:weblogic:jts:FTPool", null);
    ... do all the jdbc for the method...
    c.close();
    c = null;
    catch (Exception e) {
    ... do whatever, if needed...
    finally {
    // close connection regardless of failure or exit path
    if (c != null) try {c.close();}catch (Exception ignore){}
    Joe
    Linus Nikander wrote:
    Having recently load-tested the application we are developing I noticed
    that
    one of the most expensive (time-wise) calls was my fetch of adb-connection
    from the defined db-pool. At present I fetch my connections using :
    private Connection getConnection() throws SQLException {
    try {
    Context jndiCntx = new InitialContext();
    DataSource ds =
    (DataSource)
    jndiCntx.lookup("java:comp/env/jdbc/txDatasource");
    return ds.getConnection();
    } catch (NamingException ne) {
    myLog.error(this.makeSQLInsertable("getConnection - couldnot
    find connection"));
    throw new EJBException(ne);
    In other parts of the code, not developed by the same team, I've seenthe
    same task accomplished by :
    private Connection getConnection() throws SQLException {
    return DriverManager.getConnection("jdbc:weblogic:jts:FTPool");
    From the performance-measurements I made the latter seems to be muchmore
    efficient (time-wise). To give you some metrics:
    The first version took a total of 75724ms for a total of 7224 callswhich
    gives ~ 11ms/call
    The second version took a total of 8127ms for 11662 calls which gives
    ~0,7ms/call
    I'm no JDBC guru som i'm probably missing something vital here. One
    suspicion I have is that the second call first find the jdbc-pool andafter
    that makes the very same (DataSource)
    jndiCntx.lookup("java:comp/env/jdbc/txDatasource") in order to fetch the
    actual connection anyway. If that is true then my comparison is plainwrong
    since one call is part of the second. If not, then the second versionsure
    seems a lot faster.
    Apart from the obvious performance-differences in the two aboveapproaches,
    is there any other difference one should be aware of(transaction-context
    for instance) between the two ? Basically I'm working in anEJB-environment
    on weblogic 7.0 and looking for the most efficient way to get hold of a
    db-connection in code. Comments anyone ?
    //Linus Nikander - [email protected]

  • Iterators - most efficient way to get last object?

    Collection of objects, such as from an EJB, and I want to only get the last object. What is the most efficient way of doing this?
    TIA!

    addendum to previous post.
    Allthough, that test would call to mind the question what are you going to do if it is 0? Throw an exception, as the code stands it will throw an index out of bounds exception to the calling process which could be handled there, and in truth probably should be.
    Modified and expanded example
    public class ListThingie{
         java.util.ArrayList listOfThingies = null
         public ListThingie(){
              super() ;
              listOfThingies = new java.util.ArrayList() ;
              buildListOfThingies() ;
         public void buildListOfThingies(){
              //... build the ArrayList here
         public Object getLastThingie() throws IndexOutOfBoundsException{
              return listOfThingies.get((listOfThingies.size()-1)) ;
    public class ThingieProcessor{
         public static void main( String[] args){
              try{
                   ListThingie listThingie = new ListThingie() ;
                   System.out.println(listThingie.getLastThingie()) ;
              catch(IndexOutOfBoundsException e){
                   System.out.println(e.getMessage()) ;
    }There, that's better.

  • Most efficient way to handle Image sizes with respect to Mobile Screen Size

    Hi all,
    I and trying to find the best possible way to manage Images with respect to the size of mobile screen.
    If I have an image that is best fit on mobile screen size (176 x 144) then how can I make it best fit for (128 x 128) screen size ?
    rizzz86

    Hey Rizzz86,
    You could also scale down a higher resolution image to fit smaller screens, however you will find that resizing by factors other than 2, 4, 8 is harder to achieve with a decent quality and much slower on lower spec devices.
    You could also display 128x128 image centered on 176 x 144 screen with black borders around it.
    It will look not that bad (i.e. borders of 24 pixels top and bottom and 8 pixels left and right) and will cost you nothing in terms of space or processing.
    In the end having an image in 3 different sizes will not increase the MIDlet size by much, unless you are having tens of such images (for example custom UI elements).
    Best solution is to have a bit of both I think. Personally I use scaling down by factors that are powers of 2 and displaying with the black borders.
    Daniel

  • What is the most efficient way to create an image with no background?

    When I create, or use, a logo, or type, or any graphic image,in a design, I want to import it to InDesign with no background - "transparent", if you will.
    The steps involving importing from PShop seem convoluted, at best, with bitmap, greyscale and eps files... I know I am on the wrong track with this process, since it never seems to work.
    Also, wish to import from Illustrator and sometimes Painter12.
    Is there a quick'n'dirty way, or a best way, to do this?
    Thanks, forum people!

    First, it's OK to combine responses into a single post. Everything goes to the forum, not the individual, so we all see it all,so to speak.
    Double clicking the background or duplicating it are just different paths to the same end, and you pick one based on what you are doing, as much as anything. "Background" in Photoshop is locked for transparency, so if you need a tranparent background you MUST do something. If I know I'm not going to need to do other stuff, I probably would double-click and convert the layer just for convenience and to reduce the file size, but if it's a client file or I know I may need to add adjustments and so forth, I usually will duplicate the background (even if I don't need transparency) and turn off the original. This gives me an untouched backup position and a source for making more copies, if necessary. I don't like doing any sort of destructive edit without using a copy of the original data.

  • [11g] most efficient way to calculate size of xmltype type column

    I need to check the current size of some xmltype column in a BIU trigger.
    I don't think it's good to use
      length(:new.xml_data.GetStringVal());
    or
      dbms_lob.GetLength(:new.xml_data.GetClobVal());
    What's the most efficient way to get the storage size?
    I don't need the string serialized size.
    It could also be the internal storage size (incl. administration data overhead).
    - thanks!
    regards,
    Frank

    > May I ask for what reason you need to know it?
    I need to handle very large XML document output, which currently hits the internal xmltype limitation of 4GByte, when aggregating XML document fragments for this.
    > You'll get a relevant answer if you give us relevant information :
    > - exact db version
    SELECT * FROM PRODUCT_COMPONENT_VERSION;
    product
    version
    status
    1
    NLSRTL
    11.2.0.3.0
    Production
    2
    Oracle Database 11g Enterprise Edition
    11.2.0.3.0
    64bit Production
    3
    PL/SQL
    11.2.0.3.0
    Production
    4
    TNS for Linux:
    11.2.0.3.0
    Production
    > - DDL of your table
    > XML stored as XMLType datatype can use different storage models, depending on the version.
    I don't use dedicated storage clause.
    But i am hitting the problem already for aggregation into some xmltype variable in PL/SQL
    - BEFORE writing back to a result table.
    Can i avoid such problems, when writing to a table DIRECTLY w/o intermediate xmltype PL/SQL variable
    - depending on the storage clause?
    The reason why asking how to get the size of some xmltype (in table column and/or in PL/SQL variable) is, that i am thinking of a threshold detection.
    In case threshold is reached: outsource XML fragment so far to some separate CLOB storage, and insert a smaller meta-information reference representing that in the output document.
    Finally leave up to the client system to use <xs:include> (or alike) to construct the complete document.
    rgds,
    Frank

  • Most efficient way to return the totalcount along with pagewise data [via pagenumber/pagesize as input]

    I have following query to return the page data
    declare @pageSize INT = Null
    ,@pageNumber INT = Null
    declare @totalcount int
    set @pageSize =15
    set @pageNumber = 1
    select *
    from (SELECT ROW_NUMBER()
    OVER(
    ORDER BY dbo.coordinator_event.CoordinatorId) AS RowNumberForPaging
    ,dbo.coordinator_event.EventId
    ,dbo.coordinator_event.NumberOfParticipantAllowed
    ,dbo.coordinator_event.RegistrationClosingDate
    ,dbo.coordinator_event.CoordinatorId
    ,dbo.royalevents_royalevent.title_en AS EventTitleEnglish
    ,dbo.royalevents_royalevent.StartDateTime
    ,Count(dbo.event_attendee_registration.FullName) ParticipantRegistration
    , COUNT(*) OVER(PARTITION BY 1) as TotalRows
    FROM dbo.coordinator_event
    inner JOIN dbo.royalevents_royalevent
    ON dbo.coordinator_event.EventId = dbo.royalevents_royalevent.base_id
    left JOIN dbo.event_attendee_registration
    ON dbo.coordinator_event.CoordinatorId = dbo.event_attendee_registration.CoordinatorId
    and royalevents_royalevent.base_id = event_attendee_registration.EventId
    where coordinator_event.CoordinatorId = 3
    group by dbo.coordinator_event.EventId
    ,dbo.coordinator_event.NumberOfParticipantAllowed
    ,dbo.coordinator_event.RegistrationClosingDate
    ,dbo.coordinator_event.CoordinatorId
    ,dbo.royalevents_royalevent.title_en
    ,dbo.royalevents_royalevent.StartDateTime
    ) MyTable
    WHERE RowNumberForPaging >= ( ( ( @pageSize * @pageNumber ) - @pageSize ) + 1 )
    AND RowNumberForPaging <= ( @pageSize * @pageNumber )
    ORDER BY CoordinatorId
    I want's two thing with it. One thing is about how i can easily return @totalcount as separate parameter instead of part of the result set and secondly if there is a way i can optimize above row_number query to achieve paging
    Kamran Shahid Application Developer (MCP,MCAD,MCSD.NET,MCTS,MCPD.net[web])

    What is your SQL Server version?
    I think there is no way to get the count except for using temp table, e.g.
    select *
    INTO #TempResults
    from (SELECT ROW_NUMBER()
    OVER(
    ORDER BY dbo.coordinator_event.CoordinatorId) AS RowNumberForPaging
    ,dbo.coordinator_event.EventId
    ,dbo.coordinator_event.NumberOfParticipantAllowed
    ,dbo.coordinator_event.RegistrationClosingDate
    ,dbo.coordinator_event.CoordinatorId
    ,dbo.royalevents_royalevent.title_en AS EventTitleEnglish
    ,dbo.royalevents_royalevent.StartDateTime
    ,Count(dbo.event_attendee_registration.FullName) ParticipantRegistration
    , COUNT(*) OVER(PARTITION BY 1) as TotalRows
    FROM dbo.coordinator_event
    inner JOIN dbo.royalevents_royalevent
    ON dbo.coordinator_event.EventId = dbo.royalevents_royalevent.base_id
    left JOIN dbo.event_attendee_registration
    ON dbo.coordinator_event.CoordinatorId = dbo.event_attendee_registration.CoordinatorId
    and royalevents_royalevent.base_id = event_attendee_registration.EventId
    where coordinator_event.CoordinatorId = 3
    group by dbo.coordinator_event.EventId
    ,dbo.coordinator_event.NumberOfParticipantAllowed
    ,dbo.coordinator_event.RegistrationClosingDate
    ,dbo.coordinator_event.CoordinatorId
    ,dbo.royalevents_royalevent.title_en
    ,dbo.royalevents_royalevent.StartDateTime
    ) MyTable
    WHERE RowNumberForPaging >= ( ( ( @pageSize * @pageNumber ) - @pageSize ) + 1 )
    AND RowNumberForPaging <= ( @pageSize * @pageNumber )
    select @TotalCount = TotalRows from #TempResult
    SELECT .. FROM #TempResult
    ORDER BY CoordinatorId
    See also this very recent article about the subject you ask:
    Paging
    a Query with SQL Server
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • What is the most effective way to get my imac 2 ghz intel core duo 2 10.4.11 to be able to run 10.5 and sync with my iphone 4s?

    What is the most effective way to get my imac 2 ghz intel core duo 2 10.4.11 to be able to run 10.5 and sync with my iphone 4s?

    As your Mac should run Snow Leopard provided it has at least 1GB memory, that would be a good deal easier and very much cheaper than trying to find a 10.5 install disc.
    Snow Leopard costs $30 approx from the online Apple store (£26 if you're in UK)
    You'll need to update Tiger to 10.4.11 with the combo installer first (unless you're just erasing the disc and starting fresh) You can then update SL from 10.6.3 to 10.6.8 with its combo installer.
    For comparison, 10.5 Leopard is currently running about $130 from Apple (if still available) and more on Amazon etc.
    This info for Leopard courtesy of TexasMacMan;
    Mac OS X 10.5 Leopard installation system requirements
    http://support.apple.com/kb/TA24950
    Leopard is no longer available at the Apple Store but may be available by calling Apple Phone Sales @ 1-800-MY-APPLE (1-800-692-7753).
    If you can't obtain a retail install DVD from Apple, look on eBay or Google the installer part numbers to possibly find at an on-line store. Here's what to look for:
    MB427Z/A  Leopard 10.5.1 install DVD
    MB576Z/A  Leopard 10.5.4 install DVD
    MB021Z/A  Leopard 10.5.6 install DVD (single user)
    MB022Z/A  Leopard 10.5.6 install DVD (5-user family pack)
    Installing Mac OS X 10.5 Leopard
    http://support.apple.com/kb/HT1544
    Mac OS X 10.5 Leopard Installation and Setup Guide
    http://manuals.info.apple.com/en/leopard_install-setup.pdf
    After you install the base 10.5, download & install the 10.5.8 combo update at http://support.apple.com/downloads/Mac_OS_X_10_5_8_Combo_Update

  • Most Efficient Way to Populate My Column?

    I have several very large tables, some of them are partitioned tables.
    I want to populate every row of one column in each of these tables with the same value.
    1.] What's the most efficient way to do this given that I cannot make the table unavailable to the users during this operation?
    I mean, if I were to simply do:
    update <table> set <column>=<value>;
    then I think I'll lock every row for writing by others until the commit. I figured there might be another way that makes better sense in my case.
    2.] Are there any optimizer hints I might be able to take advantage of here? I don't use hints much but with such a long running operation I'll take any help I can get.
    Thank you

    1. May be a better solution exists.
    Since you do not want to lock the table...
    Save the ROWID's of all the rows in that table in a temporary table.
    Write a routine which will loop through this temporary table and use the ROWID to update the main table and issue commit at regular intervals.
    However, this does not take into account the rows that would be added to main table after the temporary table has been created.
    2. Not that I am aware of.

  • Most efficient way to delete "removed" photos from hard disk?

    Hello everyone! Glad to have this great community to come to for help. I searched for this question but came up with no hits. If it's already been discussed, I apologize and would love to be directed to the link.
    My wife and I have been using LR for a long time. We're currently on version 4. Unfortunately, she's not as tech-savvy or meticulous as I am, and she has been unknowingly "Removing" photos from the LR catalogues when she really meant to delete them from the hard disk. That means we have hundreds of unwanted raw photo files floating around in our computer and no way to pick them out from the ones we want! As a very organized and space-conscious person, I can't stand the thought. So my question is, what is the most efficient way to permanently delete these unwanted photos from the hard disk
    I did fine one suggestion that said to synchronize the parent folder with their respective catalogues, select all the photos in "Previous Import," and delete those, since they will be all of the photos that were previously removed from the catalogue.
    This is a great suggestion, but it probably wouldn't work for all of my catalogues since my file structure is organized by date (the default setting for LR). So, two catalogues will share the same "parent folder" in the sense that they both have photos from May 2013, but if I synchronize May 2013 with one, then it will get all the duds PLUS the photos that belong in the other catalogue.
    Does anyone have any suggestions? I know there's probably not an easy fix, and I'm willing to put in some time. I just want to know if there is a solution and make sure I'm working as efficiently as possible.
    Thank you!
    Kenneth

    I have to agree with the comment about multiple catalogs referring to images that are mixed in together... and the added difficulty that may have brought here.
    My suggestions (assuming you are prepared to combine the current catalogs into one)
    in each catalog, put a distinctive keyword onto all the images so that you can later discriminate these images as to which particular catalog they were formerly in (just in case this is useful information later)
    as John suggests, use File / "Import from Catalog" to bring all LR images together into one catalog.
    then in order to separate out the image files that ARE imported to LR, from those which either never were / have been removed, I would duplicate just the imported ones, to an entirely separate and dedicated disk location. This may require the temporary use of an external drive, with enough space for everything.
    to do this, highlight all the images in the whole catalog, then use File / "Export as Catalog" selecting the option "include negatives". Provide a filename and location for the catalog inside your chosen new saving location. All the image files that are imported to the catalog will be selectively copied into this same location alongside the new catalog. The same relative arrangement of subfolders will be created there, for them all to live inside, as is seen currently. But image files that do not feature in LR currently, will be left behind by this operation.
    your new catalog is now functional, referring to the copied image files. Making sure you have a full backup first, you can start deleting image files from the original location, that you believe to be unwanted. You can do this safe in the knowledge that anything LR is actively relying on, has already been duplicated elsewhere. So you can be quite aggressive at this, only watching out for image files that are required for other purposes (than as master data for Lightroom) - e.g., the exported JPG files you may have made.
    IMO it is a good idea to practice a full separation of image files used in your LR image library, from all other image files. This separation means you know where it is safe to manage images freely using the OS, vs where (what I think of as the LR-managed storage area) you need to bear LR's requirements constantly in mind. Better for discrete backup, too.
    In due course, as required, the copied image files plus catalog can be moved bodily to another drive (for example, if they have been temporarily put on an external drive, and you want to store them on your main internal one again). This then just requires a single re-browsing of their parent folder's location, in order to correct LR's records inside this catalog, as to the image files' changed addresses.
    If you don't want to combine the catalogs into one, a similar set of operations as above, can be carried out for each separate catalog you have now. This will create a separate folder structure in each case, containing just those duplicated image files. Once this has been done for all catalogs, you can start to clean up the present image files location. IMO this is very much the laborious and inflexible option, so far as future management of the total body of images is concerned... though there may still be some overriding reason for working that way.
    RP

  • Most efficient way to import data from Excel to InDesign?

    Hi all,
    I'm designing a college prospectus which includes 400+ course listings. At the moment, these listings exist as a vast Excel sheet with fields like course type, course code, description etc.
    I'm familiar with importing Excel data into InDesign and formatting tables/creating table styles and such, but the problem I'm having is that the data is in multiple columns per course in the Excel sheet, but will be arranged in one column per course with multiple rows in the InDesign document. I can't seem to find a way to easily convert these columns into rows.
    Can anyone help me with an efficient way to get the data into the layout without laborious copying and pasting or formatting?
    Many thanks in advance!

    Hi,
    Dans excel coller/ transpose

  • Most efficient way to do some string manipulation

    Greetings,
    I need to cleanse some data in a string by replacing unsafe characters with encoded equivalents. (FYI, this is for the purpose of transforming "unsafe" characters into encoded values as data inside an XML document).
    The following code accomplishes the task:
    Note that a string "currentValue" contains the data to be cleansed.
    A string, "encodedValue" contains the result.
      for (counter = 0; counter < currentValue.length(); counter++)
        addChar = (currentValue.substring(counter,counter+1));
        if (addChar.equals("<"))
          addChar = "#60;";
        if (addChar.equals(">"))
          addChar = "#62;";
        if (addChar.equals("="))
          addChar = "#61;";
        if (addChar.equals("\""))
          addChar = "#34;";
        if (addChar.equals("'"))
          addChar = "#39;";
        if (addChar.equals("'"))
          addChar = "#39;";
        if (addChar.equals("/"))
          addChar = "#47;";
        if (addChar.equals("\\"))
          addChar = "#92;";
        encodedValue += addChar;
      } // forI'm sure there is a way to make this more efficient. I'm not exactly "new" to java, but I am learning on my own with no formal training and often take a "brute force" approach with my initial effort.
    What would be the most efficient way to re-do the above?
    TIA,
    --Paul Galvin
    Integrated Systems & Services Group

    im a c++ programmer so im not totally up on these java classes either but...from a c++ stand point you might want to consider using the if else statment.
    by using if else, you only test the character until you find the actual "violating" character and skip the rest of the tests.
    also, you might trying using something to check for alphaNumeric cases first and use the continue keyword when you find one. since more of your characters are probably safe than unsafe you can skip all the ifs/if else statement and only do one test on the good characters. (i just looked for a way to test that and i didnt find one. c++ has a function that does that by checking the ascii number range. dont think that works in java. but maybe you can find one, it would reduce the number of tests probably.)
    happy hunting,
    txjump :)

  • Most efficient way to place images

    I am composing a Catalog with a lot of images along with the text.  The source images are often not square (perfectly vertical, portrait).  I also want to add a thin line frame around each one in InDesign to spurce up the look.  I'm spending a lot of time in Photoshop straightening images, because rotating in Indesign to get the image straight results in a non-straight frame.
    Should I create a small library of frames that I place, then place non-straight images in them (and how do I do that) and rotate in InDesign?  Etc?
    What would be the most efficient way to do this?
    Thanks

    To tag onto what Peter said, when you click on the image with the Direct Selection tool you can also use the up and down arrow in the rotation Dialog (where you enter the angle, at the top) to easily change the rotation.
    Also, when you place images in InDesign you can select a number of images at once and continually click the document (or image frame) and place all the images you selected to import. To clarify, you can have a whole bunch of empty image frames on the page then go to file > place and select all your images, then continually click and place them inside each empty frame.

Maybe you are looking for

  • HT200069 Hi I am having trouble with my phone

    Hi, I am using Apple I phone 5 but when I am charging my phone its getting hot. I am so afraid of this dont know what to do and where should I contact for this. Apart from this when I bought this phone ,on the packing box and as per the dealer its go

  • How to download iBooks Author

    This seems like a ridiculous question, but I can't seem to make the download work. I'm trying to download iBooks Author. I'm asked what app I want to use to open it. I have no idea. I thought it was an app. I tried choosing iTunes and I was taken to

  • Code to split biztalk xml inner node message in to many

    Hi, I want to split inner node message into many. Actually my xml message look like bellow <MSg> <Header> <InterfaceName></InterfaceName> </Header> <Detail> <detail1>1</detail1> <detail2>2</detail2> <detail3>3</detail3> <detail4>4</detail4> </Detail>

  • :( is it broken? theres a file, with a triangle and a "!"

    Note: This topic was moved from 'Usage.' HELP! my mini isnt working at all. my friend dropped it..reason of the problem...but I tried to reset it when it was frozen, but it didnt do anything but go to a blank page with a picture of a file, with a lit

  • Error in TMS configuration

    Hi All, Our landscape is SCD (Dev) --> SCQ (Test) --> SCP (Prod), SCD being the domain controller. We just installed SCQ. I configured STMS and replaced SCQ virtual system with actual system. Now, when I execute connection test (from TX STMS) in syst